Yohanes Santoso wrote:
> Tanpa konteks dimana dia ucapakan itu, susah diketahui apa yang dia
> maksud.
>
> Tetapi pada umumnya, 'you can shoot your own feet' artinya kamu masih
> bisa melakukan hal2x yang merugikan kamu atau yang kamu tidak
> harapkan.
Hi, Yohanes, ini konteks forward dari yang pernah Matz ucapkan dulu:
-------- Original Message --------
Subject: Re: irb crash
Date: Tue, 9 May 2006 14:55:28 +0900
From: Yukihiro Matsumoto <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED] (ruby-talk ML)
Hi,
In message "Re: irb crash"
on Tue, 9 May 2006 14:36:33 +0900, Elliot Temple <[EMAIL PROTECTED]>
writes:
|I'm new so I don't know if/where I should report this...
|
|if I type:
|
|String = Hash
|
|in irb twice it crashes. it crashed with other stuff besides Hash,
|too. just doing it twice at once with a semicolon doesn't crash
|immediately.
Re-assigning predefined class like String should cause serious
problems such as you've seen. Ruby allows you to shoot your foot.
matz.
> YS.
kalau dibawah ini saya yang iseng:
sayang:~ arie$ irb
Arigatou jyanai! Pizza wa (2) ni-mai, OK!
Terima kasih boleh2 saja, pizza+hotel_empuk itulah yg lebih dari boleh2 saja
irb(main):001:0> String = Hash
(irb):1: warning: already initialized constant String
=> Hash
irb(main):002:0> String = Hash
/opt/local/lib/ruby/1.8/irb/ruby-token.rb:101:in `Token': undefined method
`ancestors' for "=":String (NoMethodError)
from /opt/local/lib/ruby/1.8/irb/ruby-lex.rb:400:in `lex_init'
from /opt/local/lib/ruby/1.8/irb/slex.rb:237:in `call'
from /opt/local/lib/ruby/1.8/irb/slex.rb:237:in `match_io'
from /opt/local/lib/ruby/1.8/irb/slex.rb:222:in `match_io'
from /opt/local/lib/ruby/1.8/irb/slex.rb:76:in `match'
from /opt/local/lib/ruby/1.8/irb/ruby-lex.rb:287:in `token'
from /opt/local/lib/ruby/1.8/irb/ruby-lex.rb:263:in `lex'
from /opt/local/lib/ruby/1.8/irb/ruby-lex.rb:234:in
`each_top_level_statement'
from /opt/local/lib/ruby/1.8/irb/ruby-lex.rb:230:in `loop'
from /opt/local/lib/ruby/1.8/irb/ruby-lex.rb:230:in
`each_top_level_statement'
from /opt/local/lib/ruby/1.8/irb/ruby-lex.rb:229:in `catch'
from /opt/local/lib/ruby/1.8/irb/ruby-lex.rb:229:in
`each_top_level_statement'
from /opt/local/lib/ruby/1.8/irb.rb:146:in `eval_input'
from /opt/local/lib/ruby/1.8/irb.rb:70:in `start'
from /opt/local/lib/ruby/1.8/irb.rb:69:in `catch'
from /opt/local/lib/ruby/1.8/irb.rb:69:in `start'
from /opt/local/bin/irb:13
sayang:~ arie$
To be clear, I'm not asking you about "Re-assigning predefined class", it's
just
for the "shoot your feet" context clarification.
--
r9 = { nama: Arie, nick: ariekeren, ym!: riyari3,
blog: http://ariekusumaatmaja.wordpress.com,
myst: http://groups.yahoo.com/groups/id-ruby,
naruto: 'ochikobore da kara' }