Bug #3724: instance_variables comparison not working with symbol ?
http://redmine.ruby-lang.org/issues/show/3724

Author: Guillaume Coré
Status: Open, Priority: Normal
Category: core
ruby -v: ruby-1.9.1-p378

ruby-1.9.1-p378 > class A; attr_accessor :ok; end
 => nil 
ruby-1.9.1-p378 > a = A.new
 => #<A:0x8d2b0b8> 
ruby-1.9.1-p378 > a.ok = 2
 => 2 
ruby-1.9.1-p378 > a.instance_variables
 => [:ok] 
ruby-1.9.1-p378 > a.instance_variables.class
 => Array 
ruby-1.9.1-p378 > a.instance_variables.first.class
 => Symbol 
ruby-1.9.1-p378 > a.instance_variables.include? :ok
 => false 
ruby-1.9.1-p378 > b = [:ok]
 => [:ok] 
ruby-1.9.1-p378 > b.first.class
 => Symbol 
ruby-1.9.1-p378 > b.include? :ok
 => true

same for 1.9.2


----------------------------------------
http://redmine.ruby-lang.org