[ruby-core:63065] [ruby-trunk - Bug #9926] [Open] class_eval : string and block

From: se8.and@...
Date: 2014-06-10 13:54:20 UTC
List: ruby-core #63065
Issue #9926 has been reported by S辿bastien Durand.

----------------------------------------
Bug #9926: class_eval : string and block
https://bugs.ruby-lang.org/issues/9926

* Author: S辿bastien Durand
* Status: Open
* Priority: Normal
* Assignee: 
* Category: 
* Target version: 
* ruby -v: ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-linux]
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN
----------------------------------------
I'm not sure, is this a bug or a feature ?

class Foo; @@bar = 'bar'; end
p Foo.class_eval('@@bar') # => "bar"
p Foo.class_eval { @@bar } => uninitialized class variable @@bar in Object (NameError)



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

In This Thread

Prev Next