Ruby Compiler Error Message

e$B5$$K$J$C$?$N$GEj9F$5$;[email protected]$-$^$9!%e(B

e$BHs>o$K4VH4$1$J%3!<%I$J$N$G$9$,!$e(B

class Hoge
@a
@@pee=0
def initialize(s)
@a=s
end
def Hoge.foo
p @a
@@pee+=1
end
end

t = Hoge.new(“bar”)
Hoge.foo

#=>nil

e$BEvA3$3$&$J$j$^$9!%e(B
-w e$B$rIU$1$F$b!$;XE&$7$J$$$h$&$G$9!%e(B
e$B$d$C$Q$j!$%/%i%9%a%=%C%IFb$N%m!<%+%k$G%$%s%9%?%s%9JQ?t$r;HMQ$7$?>l9g!$I,$:e(B
nile$B$K$J$k$N$G!$%3%s%Q%$%i$G$O$8$/[email protected]$H;W$&$N$G$9$,!$$I$&$J$N$G$7$g$&$+!%e(B
e$B$^$"!$;EMM$H$7$F5$$r$D$1$F=q$1$P$$$$$N$G$9$,!%Hh$l$F$k$H$&$C$+$j=q$$$F$7e(B
e$B$^$C$?$j!%e(B(e$B!(!&&X!&e(B)

[email protected]>;3OB9-$G$9!#e(B

end

e$BEvA3$3$&$J$j$^$9!%e(B
-w e$B$rIU$1$F$b!$;XE&$7$J$$$h$&$G$9!%e(B

-we$B$r$D$1$k$He(B1.8e$B$G$be(B1.9e$B$G$be(B
warning: useless use of a variable in void context
e$B$,e(B1e$B2s$He(B
warning: instance variable @a not initialized
e$B$,e(B2e$B2s=P$k$H;W$&$N$G$9$,!"$I$N%P!<%8%g%s$Ne(Brubye$B$re(B
e$B;H$C$F$$$k$N$G$7$g$&$+e(B?

e$B4d7n$H?=$7$^$9!#e(B

06/07/02 e$B$Ke(B Akiduki Rindow[email protected]
e$B$5$s$O=q$-$^$7$?e(B:

e$B$d$C$Q$j!$%/%i%9%a%=%C%IFb$N%m!<%+%k$G%$%s%9%?%s%9JQ?t$r;HMQ$7$?>l9g!$I,$:e(B
nile$B$K$J$k$N$G!$%3%s%Q%$%i$G$O$8$/[email protected]$H;W$&$N$G$9$,!$$I$&$J$N$G$7$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ected]$m$&$H;W$C$F$7$^$$$^$9$,!$<gBje(B
e$B$+$i$=$l$=$&$J$N$G;_$a$F$*$-$^$9!%e(B

e$B$"$j$,$H$&$4$6$$$^$7$?!%e(B

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs