From: itsme213 Date: 2004-12-01T23:52:50+09:00 Subject: Re: singleton methods : when are they not permitted? > You can view "x" as an object constructor (much similar to 1, [] {1=>2} > etc.). Different from 1 "x" creates new instances every time it is > executed: > That explains why a) it doesn't make sense to do 'def "x".foo()...end' > (regardless of the number of brackets around "x") and b) Ruby issues the > warning / error message. I'm sure I am missing something. a = "x" def a.foo; end b = a b.foo Have I not defined a singleton method on a literal?