Project

General

Profile

Bug #11212

defined?(foo()) ignores respond_to_missing?

Added by ko1 (Koichi Sasada) about 4 years ago. Updated about 1 month ago.

Status:
Closed
Priority:
Normal
Target version:
-
[ruby-dev:49012]

Description

class C
  def respond_to_missing? *args
    true
  end

  def test
    p defined?(non_exist_method())
  end
end

C.new.test

This script prints only nil. It ignores respond_to_missing?.
It should be a bug.

History

Updated by jeremyevans0 (Jeremy Evans) about 1 month ago

  • Status changed from Open to Closed

Also available in: Atom PDF