mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
test: add parentheses to method calls on assignment RHS
Preparation for future grammar simplification that may require parentheses for method calls with arguments on the right-hand side of assignments. Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
+1
-1
@@ -46,7 +46,7 @@ assert('NameError', '15.2.31') do
|
||||
raise NameError.new
|
||||
end
|
||||
|
||||
e = NameError.new "msg", "name"
|
||||
e = NameError.new("msg", "name")
|
||||
assert_equal "msg", e.message
|
||||
assert_equal "name", e.name
|
||||
end
|
||||
|
||||
@@ -9,7 +9,7 @@ assert('NoMethodError', '15.2.32') do
|
||||
end
|
||||
|
||||
assert('NoMethodError#args', '15.2.32.2.1') do
|
||||
a = NoMethodError.new 'test', :test, [1, 2]
|
||||
a = NoMethodError.new('test', :test, [1, 2])
|
||||
assert_equal [1, 2], a.args
|
||||
|
||||
assert_nothing_raised do
|
||||
|
||||
Reference in New Issue
Block a user