有人可以解释这种Ruby行为吗?我在文档中找不到关于此序列的任何提及,也许我不知道在哪里看。
> var = "qw#@er"
=> "qw"
> var = 'qw#@er'
=> "qw\#@er"
> var = "qw#@@er"
NameError: uninitialized class variable @@er in Object
from (irb):17:in `evaluate'
from org/jruby/RubyKernel.java:1079:in `eval'
from org/jruby/RubyKernel.java:1479:in `loop'
from org/jruby/RubyKernel.java:1242:in `catch'
from org/jruby/RubyKernel.java:1242:in `catch'