More useful regexp variables
mame opened this issue · 0 comments
mame commented
"foo 123 bar".gsub(/\w+/) do
$&.upcase #=> [error] undefined method: nil#upcase
end
It would be great if $&
, $1
, etc. respects the context.
BTW, Steep seems to handle such variables as always Strings. It is not correct but maybe more useful.