From 99674185d63162eadcded3d2623a181fddf2bbb3 Mon Sep 17 00:00:00 2001 From: Ufuk Kayserilioglu Date: Wed, 26 Jun 2024 17:38:01 -0400 Subject: Start handling `&nil` in method parameters Similar to `:nokey` for `**nil` declaring methods/procs, a method/proc with a `&nil` declaration will return a `:noblock` entry in the parameters array. --- spec/ruby/language/block_spec.rb | 2 +- spec/ruby/language/method_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'spec/ruby/language') diff --git a/spec/ruby/language/block_spec.rb b/spec/ruby/language/block_spec.rb index 1890f0726a..ad6f7190b4 100644 --- a/spec/ruby/language/block_spec.rb +++ b/spec/ruby/language/block_spec.rb @@ -1111,7 +1111,7 @@ describe "`it` calls without arguments in a block" do end end - ruby_version_is "3.4" do + ruby_version_is "4.1" do it "works alongside disallowed block argument" do no_block = eval <<-EOF proc {|arg1, &nil| arg1} diff --git a/spec/ruby/language/method_spec.rb b/spec/ruby/language/method_spec.rb index d12fd71b21..dd93703d9f 100644 --- a/spec/ruby/language/method_spec.rb +++ b/spec/ruby/language/method_spec.rb @@ -1128,7 +1128,7 @@ describe "A method" do result.should == [1, nil, nil, {foo: :bar}, nil, {}] end - ruby_version_is "3.4" do + ruby_version_is "4.1" do evaluate <<-ruby do def m(a, &nil); a end; ruby -- cgit v1.2.3