From: serialhex Date: 2011-01-02T14:54:33+09:00 Subject: Re: 1.respond_to? :define_singleton_method # => true --0016e64c1e764e48120498d6abd4 Content-Type: text/plain; charset=ISO-8859-1 umm... >> 1.define_singletone_method(:new_method){} > NoMethodError: undefined method `define_singletone_method' for > 1:Fixnum > from (irb):7 > from /usr/local/bin/irb19:12:in `
' > the first thing i do when i get an error is spell-check :P anyway, when i run it i get: irb(main):001:0> 1.respond_to? :define_singleton_method => true irb(main):002:0> 1.methods.include?(:define_singleton_method) => true irb(main):003:0> 1.define_singleton_method(:new_method){} TypeError: can't define singleton from (irb):3:in `define_singleton_method' from (irb):3 from C:/Ruby192/bin/irb:12:in `
' irb(main):004:0> it's prolly to protect the coolness of integers & stuff, as from what i understand all the basic integers are pre-defined & immutable. hex --0016e64c1e764e48120498d6abd4--