Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: jruby/jruby
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 3299e4f46d47
Choose a base ref
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 9de5fa0d49d1
Choose a head ref
  • 2 commits
  • 1 file changed
  • 1 contributor

Commits on Jan 12, 2017

  1. Copy the full SHA
    6b656fc View commit details
  2. [Truffle] Do not cache Regexp#named_captures.

    * It is not a fast-path operation, neither Regexp#names nor MatchData#names.
    * Caching still involves Hash#dup.
    * See #4436.
    eregon committed Jan 12, 2017
    Copy the full SHA
    9de5fa0 View commit details
Showing with 1 addition and 2 deletions.
  1. +1 −2 truffle/src/main/ruby/core/regexp.rb
3 changes: 1 addition & 2 deletions truffle/src/main/ruby/core/regexp.rb
Original file line number Diff line number Diff line change
@@ -309,8 +309,7 @@ def option_to_string(option)
# #=> {}
#
def named_captures
@named_captures ||= Hash[Truffle.invoke_primitive(:regexp_names, self)].freeze
@named_captures.dup
Hash[Truffle.invoke_primitive(:regexp_names, self)]
end

#