Skip to content

Commit

Permalink
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 0 additions & 2 deletions spec/truffle/tags/core/hash/to_proc_tags.txt

This file was deleted.

6 changes: 5 additions & 1 deletion truffle/src/main/ruby/core/hash.rb
Original file line number Diff line number Diff line change
@@ -467,7 +467,11 @@ def to_hash
end

def to_proc
lambda { |key| self[key] }
proc_hash = self
Proc.new { |*args|
Rubinius::Type.check_arity(args.size, 1, 1)
proc_hash[args[0]]
}
end

# Implementation of a fundamental Rubinius method that allows their Hash

0 comments on commit 567e3e1

Please sign in to comment.