Skip to content

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

Merged
headius merged 1 commit into
jruby:masterfrom
sampokuokkanen:fix-undefined-argument
Sep 2, 2026
Merged

headius merged 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.
@sampokuokkanen
sampokuokkanen force-pushed the fix-undefined-argument branch from 7070d83 to 5f25bf0 Compare August 27, 2026 04:56
@headius
headius merged commit a6aaf40 into jruby:master Sep 2, 2026
134 checks passed
@headius

headius commented Sep 2, 2026

Copy link
Copy Markdown
Member

Looks good, thank you!

@headius headius added this to the JRuby 10.1.2.0 milestone Sep 3, 2026
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.

2 participants