[Bug #1491] $B!V(Battr_reader :$B!{!{!W$H!V(Bdef $B!{!{(B ; @$B!{!{(B ; end$B!W$GF0:n$,0[$J

Bug #1491: e$B!Ve(Battr_reader :e$B!{!{!W$H!Ve(Bdef e$B!{!{e(B ;
@e$B!{!{e(B ; ende$B!W$GF0:n$,0[$J$ke(B
http://redmine.ruby-lang.org/issues/show/1491

e$B5/I<<Te(B: e$B?50le(B e$B9>8}e(B
e$B%9%F!<%?%9e(B: Open, e$BM%@hEYe(B: Normal
ruby -v: ruby 1.9.1p129 (2009-05-12 revision 23412) [i686-linux]

e$B!{!{$NItJ,$KF|K\8l$rF~$l$?>l9g$K8=>]$,H/@8$7$^$9!#e(B
e$B$*<j?t$G$9$,!"$4BP1~$NDx!"59$7$/$*4j$$CW$7$^$9!#e(B

-- coding: utf-8 --

class Foo
attr_reader :foo
attr_reader :e$B$[$2e(B
def initialize
@foo=“foo”
@e$B$[$2e(B=“e$B$[$2e(B”
@e$B$U$2e(B=“e$B$U$2e(B”
end
def e$B$U$2e(B
@e$B$U$2e(B
end
alias :e$B$U$&e(B :foo
end

p Foo.new.foo #=> “foo”
p Foo.new.e$B$[$2e(B #=> nil # “e$B$[$2e(B”
e$B$K$J$k$N$,@5$7$$$h$&$J!&!&!&!#e(B
p Foo.new.e$B$U$2e(B #=> “e$B$U$2e(B”
p Foo.new.e$B$U$&e(B #=> “foo”

e$B%A%1%C%He(B #1491 e$B$,99?7$5$l$^$7$?!#e(B (by Yukihiro M.)

e$B%9%F!<%?%9e(B Opene$B$+$ie(BClosede$B$KJQ99e(B

r23491

http://redmine.ruby-lang.org/issues/show/1491