mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Assoc pattern matching (#3703)
[Feature #17260] One-line pattern matching using tASSOC R-assignment is rejected instead.
This commit is contained in:
parent
cffdacb15a
commit
52c630da00
Notes:
git
2020-10-26 18:00:56 +09:00
Merged-By: nobu <nobu@ruby-lang.org>
8 changed files with 37 additions and 65 deletions
|
@ -68,13 +68,13 @@ describe "Processing RUBYOPT" do
|
|||
|
||||
it "suppresses experimental warnings for '-W:no-experimental'" do
|
||||
ENV["RUBYOPT"] = '-W:no-experimental'
|
||||
result = ruby_exe('0 in a', args: '2>&1')
|
||||
result = ruby_exe('case 0; in a; end', args: '2>&1')
|
||||
result.should == ""
|
||||
end
|
||||
|
||||
it "suppresses deprecation and experimental warnings for '-W:no-deprecated -W:no-experimental'" do
|
||||
ENV["RUBYOPT"] = '-W:no-deprecated -W:no-experimental'
|
||||
result = ruby_exe('($; = "") in a', args: '2>&1')
|
||||
result = ruby_exe('case ($; = ""); in a; end', args: '2>&1')
|
||||
result.should == ""
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue