diff options
Diffstat (limited to 'spec/ruby')
-rw-r--r-- | spec/ruby/core/hash/to_proc_spec.rb | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/spec/ruby/core/hash/to_proc_spec.rb b/spec/ruby/core/hash/to_proc_spec.rb index 3e7e57d11f..700621f162 100644 --- a/spec/ruby/core/hash/to_proc_spec.rb +++ b/spec/ruby/core/hash/to_proc_spec.rb @@ -19,8 +19,16 @@ describe "Hash#to_proc" do @proc = @hash.to_proc end - it "is not a lambda" do - @proc.lambda?.should == false + ruby_version_is ""..."2.8" do + it "is not a lambda" do + @proc.lambda?.should == false + end + end + + ruby_version_is "2.8" do + it "is a lambda" do + @proc.lambda?.should == true + end end it "raises ArgumentError if not passed exactly one argument" do |