Little more advanced, but common usecase, which also doesn't have built-in function is replacing all strings in simple way (i.e. gsub replacement, not sub replacement).sheerun (Adam Stankiewicz)
For now I'm using self-implemented function, but I wish there was something built-in: ```rb class String # Simple substitution, ignores backreferences in sub # https://bugs.ruby-lang.org/issues/17184 def ssub(str, sub) ...sheerun (Adam Stankiewicz)
byroot (Jean Boussier) wrote in #note-2: > The intended API for that is `String[]=`, e.g. Is there a non-mutable version of this?sheerun (Adam Stankiewicz)
I have following simple `build.rb`: ```rb template = File.read('template.vim') script = File.read('script.vim') File.write('app.vim', template.gsub("SCRIPT", script)) ``` And then following `template.vim`: ```vim " some hea...sheerun (Adam Stankiewicz)
matz (Yukihiro Matsumoto) wrote: > In Ruby, Symbols annd Strings are different in both semantics and behavior (and implementation). > ... Did it change since ruby got frozen string? Is there much difference between frozen string and sy...sheerun (Adam Stankiewicz)
@shyouhei @matz Could this be revisited as ruby now has frozen strings? They behave pretty much the same as symbols. Here's an article worth read: http://blog.arkency.com/could-we-drop-symbols-from-ruby/sheerun (Adam Stankiewicz)
Hey, The ruby developers are so used to ActiveSupport extensions used by Rails, its even hard for them to tell what's Ruby and what's Rails, as shown by: http://railshurts.com/quiz/ Maybe we could incorporate ActiveSupport extensio...sheerun (Adam Stankiewicz)