From: "Pavel R." Date: 2010-12-20T05:07:35+09:00 Subject: Regexp, String, Symbol literals' object_ids Regexp literals: 5.times { p /abcdasdf/.object_id } -> same! String literals: 5.times { 'asdasdf'.object_id } -> different Symbols: 5.times { p :asdfsf.object_id } -> same! Symbols with to_s: 5.times { p :asdsdfsdf.to_s.object_id } -> different Predefined string as a constant CONS = 'asdfsdf' 5.times { p CONS.object_id } -> same! (sure) Question: Is there some special syntax for string literals ("asdfasdf") to behave like /sadfsdf/ as in the examples above? Without predefining a string as a constant's value. Or another elegant way to achieve the same goal? -- Posted via http://www.ruby-forum.com/.