Files
mruby-mruby/test/t/nomethoderror.rb
Yukihiro "Matz" Matsumoto 32a27216bb 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>
2026-01-27 14:58:14 +09:00

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