Type:
Class

Raised when a method is called on a receiver which doesn't have it defined and also fails to respond with method_missing.

1
"hello".to_ary

raises the exception:

1
NoMethodError: undefined method `to_ary' for "hello":String
args
  • References/Ruby on Rails/Ruby/Classes/NoMethodError

no_method_error.args â obj Instance Public methods Return the arguments passed

2025-01-10 15:47:30
new
  • References/Ruby on Rails/Ruby/Classes/NoMethodError

NoMethodError.new(msg, name [, args]) â no_method_error Class Public methods Construct

2025-01-10 15:47:30