Actions
Bug #492
closeddefined? a && defined? b
Description
=begin
defined? a && defined? b がnilになります。両方定義されてるんだからnilはおかしいはずです。
irb(main):001:0> [RUBY_VERSION, RUBY_REVISION]
=> ["1.9.0", 17576]
irb(main):002:0> a = b = nil
=> nil
irb(main):003:0> defined? a && defined? b
=> nil
1.8ではdefined?(a && defined? b)と解釈されて"expression"になります
irb(main):001:0> [RUBY_VERSION, RUBY_REVISION]
=> ["1.8.7", 17572]
irb(main):002:0> a = b = nil
=> nil
irb(main):003:0> defined? a && defined? b
=> "expression"
irb(main):004:0>
=end
Updated by matz (Yukihiro Matsumoto) about 16 years ago
- Status changed from Open to Closed
- % Done changed from 0 to 100
=begin
Applied in changeset r18834.
=end
Actions
Like0
Like0