7th Thu
Fixnum#respond_to?
例外で反応するのをrespondしてるといわないでほしい・・・
ruby>>
irb(main):001:0> 1.respond_to? :dup
=> true
irb(main):002:0> 1.dup
TypeError: can't dup Fixnum
from (irb):2:in `dup'
from (irb):2
from :0
<<ruby
posted by
technohippy on Thu 7 Aug 2008 at 16:46 with 0 comments