Skip to content

ZJIT: fix defined?(method call expr) #703

@tekknolagi

Description

@tekknolagi

Currently buggy. Not sure why. Repro:

class C
  def assert_equal expected, actual
    if expected != actual
      raise "NO"
    end
  end

  def test_defined_method
    assert_equal(nil, defined?("x".reverse(1).reverse))
  end
end

c = C.new
c.test_defined_method
c.test_defined_method
c.test_defined_method

Adding a temporary side-exit into HIR building to work around this. To reproduce this bug, remove the side-exit.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions