mattn/mruby-onig-regexp

Doesn't freak out when replacing `^`

Closed this issue · 2 comments

ksss commented
$cat t.rb
"Text\nFoo".gsub(/^/, ' ')
$ ruby t.rb
" Text\n Foo"
$ mruby t.rb
" Text\n ext\n xt\n t\n \n Foo"

See also https://github.com/ruby/spec/blob/0fe99d24f4a17eaa39563623209747eee278c3d1/core/string/gsub_spec.rb#L38

ksss commented

Cool! Thanks '^'

mattn commented

💪