[#84867] [Ruby trunk Bug#14357] thread_safe tests suite segfaults — v.ondruch@...

Issue #14357 has been reported by vo.x (Vit Ondruch).

11 messages 2018/01/15

[#84980] [Ruby trunk Feature#13618][Assigned] [PATCH] auto fiber schedule for rb_wait_for_single_fd and rb_waitpid — hsbt@...

Issue #13618 has been updated by hsbt (Hiroshi SHIBATA).

10 messages 2018/01/23
[#85012] Re: [Ruby trunk Feature#13618][Assigned] [PATCH] auto fiber schedule for rb_wait_for_single_fd and rb_waitpid — Eric Wong <normalperson@...> 2018/01/23

hsbt@ruby-lang.org wrote:

[ruby-core:85142] [Ruby trunk Bug#14407] defined? still returning true for top-level constant when referenced with scope

From: grzuy0@...
Date: 2018-01-27 02:32:44 UTC
List: ruby-core #85142
Issue #14407 has been reported by grzuy (Gonzalo Rodriguez).

----------------------------------------
Bug #14407: defined? still returning true for top-level constant when referenced with scope
https://bugs.ruby-lang.org/issues/14407

* Author: grzuy (Gonzalo Rodriguez)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: 2.5.0
* Backport: 2.3: UNKNOWN, 2.4: UNKNOWN, 2.5: UNKNOWN
----------------------------------------
~~~ ruby
class A
end

class B
end

if defined?(A::B)
  puts "defined"

  puts A::B
else
  puts "not defined"
end
~~~


When running this script with ruby 2.5.0 i get:

~~~
defined
Traceback (most recent call last):
test.rb:10:in `<main>': uninitialized constant A::B (NameError)
Did you mean?  B
~~~

while my expectation was that after the top-level constant lookup was removed from ruby 2.5, defined? would return false and i would actually get 

~~~
not defined
~~~

as output




-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>

In This Thread

Prev Next