Issue #9926 has been reported by Sbastien Durand.

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

* Author: Sbastien 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/