Some keywords, "true", "false", and "nil" should be treated as a variable

This commit is contained in:
aycabta 2019-07-20 02:53:40 +09:00
parent 0a16ff9f83
commit de18328192

View File

@ -205,7 +205,7 @@ module IRB
sep = $2 sep = $2
message = Regexp.quote($3) message = Regexp.quote($3)
gv = eval("global_variables", bind).collect{|m| m.to_s} gv = eval("global_variables", bind).collect{|m| m.to_s}.append("true", "false", "nil")
lv = eval("local_variables", bind).collect{|m| m.to_s} lv = eval("local_variables", bind).collect{|m| m.to_s}
iv = eval("instance_variables", bind).collect{|m| m.to_s} iv = eval("instance_variables", bind).collect{|m| m.to_s}
cv = eval("self.class.constants", bind).collect{|m| m.to_s} cv = eval("self.class.constants", bind).collect{|m| m.to_s}