P
Phil said:
Phil Tomson said:
gabriele said:il 19 Jul 2004 21:37:37 GMT, (e-mail address removed) (Phil Tomson) ha
scritto::
this made me notice this:
ruby -e "self.puts 'ciao' "
-e:1: private method `puts' called for main:Object (NoMethodError)
why this error appears?
S> puts is - as the error message says, a privat method.
S> In Ruby - if memory serves right - private methods can only be called
S> with an implicit receiver.
svg% ruby -e 'Kernel.puts "I am a Kernel module function"'
I am a Kernel module function
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.