mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
32a27216bb
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>
23 lines
484 B
Ruby
23 lines
484 B
Ruby
##
|
|
# NoMethodError ISO Test
|
|
|
|
assert('NoMethodError', '15.2.32') do
|
|
NoMethodError.class == Class
|
|
assert_raise NoMethodError do
|
|
doesNotExistAsAMethodNameForVerySure("")
|
|
end
|
|
end
|
|
|
|
assert('NoMethodError#args', '15.2.32.2.1') do
|
|
a = NoMethodError.new('test', :test, [1, 2])
|
|
assert_equal [1, 2], a.args
|
|
|
|
assert_nothing_raised do
|
|
begin
|
|
doesNotExistAsAMethodNameForVerySure 3, 1, 4
|
|
rescue NoMethodError => e
|
|
assert_equal [3, 1, 4], e.args
|
|
end
|
|
end
|
|
end
|