diff options
author | Benoit Daloze <eregontp@gmail.com> | 2020-07-28 20:39:27 +0200 |
---|---|---|
committer | Benoit Daloze <eregontp@gmail.com> | 2020-07-29 18:09:53 +0200 |
commit | 241244739f2b721ac7aa0961bd90d904c5e3fff6 (patch) | |
tree | ad0a6223575301c7e395e47e3183e940dcd0b162 /spec | |
parent | f79dc8741f631f5572f4d2fa3cb7cad39b1356bb (diff) | |
download | ruby-241244739f2b721ac7aa0961bd90d904c5e3fff6.tar.gz |
Fix arity of Hash#to_proc [Bug #12671]
Diffstat (limited to 'spec')
-rw-r--r-- | spec/ruby/core/hash/to_proc_spec.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/ruby/core/hash/to_proc_spec.rb b/spec/ruby/core/hash/to_proc_spec.rb index 8b7ddd5e00..73c96bdf08 100644 --- a/spec/ruby/core/hash/to_proc_spec.rb +++ b/spec/ruby/core/hash/to_proc_spec.rb @@ -29,6 +29,10 @@ describe "Hash#to_proc" do it "is a lambda" do @proc.should.lambda? end + + it "has an arity of 1" do + @proc.arity.should == 1 + end end it "raises ArgumentError if not passed exactly one argument" do |