* [ruby-dev:49012] [Ruby trunk - Bug #11212] [Open] defined?(foo()) ignores respond_to_missing?
[not found] <redmine.issue-11212.20150602192122@ruby-lang.org>
@ 2015-06-02 19:21 ` ko1
2019-07-23 17:36 ` [ruby-dev:50818] [Ruby master Bug#11212] " merch-redmine
1 sibling, 0 replies; 2+ messages in thread
From: ko1 @ 2015-06-02 19:21 UTC (permalink / raw)
To: ruby-dev
Issue #11212 has been reported by Koichi Sasada.
----------------------------------------
Bug #11212: defined?(foo()) ignores respond_to_missing?
https://bugs.ruby-lang.org/issues/11212
* Author: Koichi Sasada
* Status: Open
* Priority: Normal
* Assignee: Yukihiro Matsumoto
* ruby -v: 2.3dev
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN
----------------------------------------
```ruby
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.
--
https://bugs.ruby-lang.org/
^ permalink raw reply [flat|nested] 2+ messages in thread
* [ruby-dev:50818] [Ruby master Bug#11212] defined?(foo()) ignores respond_to_missing?
[not found] <redmine.issue-11212.20150602192122@ruby-lang.org>
2015-06-02 19:21 ` [ruby-dev:49012] [Ruby trunk - Bug #11212] [Open] defined?(foo()) ignores respond_to_missing? ko1
@ 2019-07-23 17:36 ` merch-redmine
1 sibling, 0 replies; 2+ messages in thread
From: merch-redmine @ 2019-07-23 17:36 UTC (permalink / raw)
To: ruby-dev
Issue #11212 has been updated by jeremyevans0 (Jeremy Evans).
Status changed from Open to Closed
Fixed by commit:a54da1c05058d9f873f28c317677c5393d7327c9.
----------------------------------------
Bug #11212: defined?(foo()) ignores respond_to_missing?
https://bugs.ruby-lang.org/issues/11212#change-79899
* Author: ko1 (Koichi Sasada)
* Status: Closed
* Priority: Normal
* Assignee: matz (Yukihiro Matsumoto)
* Target version:
* ruby -v: 2.3dev
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN
----------------------------------------
```ruby
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.
--
https://bugs.ruby-lang.org/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-07-23 17:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <redmine.issue-11212.20150602192122@ruby-lang.org>
2015-06-02 19:21 ` [ruby-dev:49012] [Ruby trunk - Bug #11212] [Open] defined?(foo()) ignores respond_to_missing? ko1
2019-07-23 17:36 ` [ruby-dev:50818] [Ruby master Bug#11212] " merch-redmine
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).