Skip to content

Check argument definedness in defined?(receiver.method(arg))#9460

Open
sampokuokkanen wants to merge 1 commit into
jruby:masterfrom
sampokuokkanen:fix-undefined-argument
Open

Check argument definedness in defined?(receiver.method(arg))#9460
sampokuokkanen wants to merge 1 commit into
jruby:masterfrom
sampokuokkanen:fix-undefined-argument

Conversation

@sampokuokkanen

Copy link
Copy Markdown
Contributor

Mirrors the FCALLNODE path. Fixes test_defined_undefined_argument.

Sample code of the problem:

class Test
  def hello x
    puts "Hello #{x}"
  end
end

p defined? Test.new.hello(hello)

Before this fix: "method", now nil.

Mirrors the FCALLNODE path. Fixes test_defined_undefined_argument.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant