Skip to content

Commit

Permalink
Showing 2 changed files with 11 additions and 2 deletions.
11 changes: 11 additions & 0 deletions core/src/main/ruby/jruby/truffle/core/shims.rb
Original file line number Diff line number Diff line change
@@ -55,3 +55,14 @@ def each_key
end

end

class Regexp
def self.last_match(n = nil)
if n
# TODO (nirvdrum Jan. 8, 2015) Make sure this supports symbol keys for named capture lookup.
$~.values_at(n).first
else
$~
end
end
end
2 changes: 0 additions & 2 deletions spec/truffle/tags/core/regexp/last_match_tags.txt

This file was deleted.

0 comments on commit 2e55827

Please sign in to comment.