Project

General

Profile

Bug #11212

defined?(foo()) ignores respond_to_missing?

Added by ko1 (Koichi Sasada) almost 5 years ago. Updated 10 months 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.

Updated by jeremyevans0 (Jeremy Evans) 10 months ago

  • Status changed from Open to Closed

Also available in: Atom PDF