This project is closed and read-only.
Actions
Bug #2362
closedundefined variable has value?
Bug #2362:
undefined variable has value?
Status:
Rejected
Assignee:
-
Description
=begin
C:>type test.rb
if false
a = 5
else
end
c = a
d = b
C:>c:\ruby\bin\ruby.exe test.rb
test.rb:7:in <main>': undefined local variable or method b' for main:Object (NameError)
From my point of view, the variable "a" was never reached. How that can be that it is later defined with nil value?
=end
Actions