summaryrefslogtreecommitdiff
path: root/spec/ruby/language
diff options
context:
space:
mode:
authorUfuk Kayserilioglu <ufuk.kayserilioglu@shopify.com>2024-06-26 17:38:01 -0400
committerKevin Newton <kddnewton@gmail.com>2026-02-15 14:12:15 -0500
commit99674185d63162eadcded3d2623a181fddf2bbb3 (patch)
tree0b2b62b3d5c9124b1fc9a9551850a3494de1fb3d /spec/ruby/language
parent071c6d149b8e67960ba809089c3736926620c40e (diff)
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.
Diffstat (limited to 'spec/ruby/language')
-rw-r--r--spec/ruby/language/block_spec.rb2
-rw-r--r--spec/ruby/language/method_spec.rb2
2 files changed, 2 insertions, 2 deletions
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