From: Laurent Julliard Date: 2001-08-01T23:08:21+09:00 Subject: [ruby-talk:18959] Using "@" as a method name? Let's start with a silly question to warm you up :-)) I know that the @ sign in Ruby is reserved for instances and class variables but I was wondering if someone knows if it is possible to say something like: myvar = @"A sample string" and have the @ class method called (without having to specify the class name before the @ sign) and do something on the sample string before assigning it to the myvar variable. If it's not possible with the @ sign can I do that with another sign or some other kind of specific and short notation. Thanks for your help PS: For those of you who know Objective C and the GNUstep environment you probably see what I want to achieve. In this environment saying @"string" has the same effect as saying NSString.new("string") in Ruby and I'd like to replicate this behavior in Ruby -- Laurent JULLIARD - XR&T Technology and Alliances Office - Open Source team Xerox / 3400 Hillview Ave. PAHV 121 / Palo-Alto CA 94304 / USA Tel/Fax US: +1 650 813 7168 / 6860 - France: +33 4 76 61 5048 / 5199 . Host your Xerox Software project on CodeX: http://codex.xerox.com . Xerox Open Source community: http://bazaar.adoc.xerox.com . Linux@Xerox community: http://xww.linux.world.xerox.com