From: nobu.nokada@... Date: 2002-12-06T14:42:27+09:00 Subject: Re: Regexp imxo - does 'x' work? Hi, At Fri, 6 Dec 2002 13:58:14 +0900, Shashank Date wrote: > Why does the preceding literal get eliminated by ;"" ? "#{"Hello";""}" is equivalent to ("Hello";"").to_s or begin "Hello" "" end.to_s Their value is one of the last expression, so value of the preceding literal is always ignored and has no effect (except for GC). > Is this some thing new in 1.7? It's warned even in 1.6, but elimination is new in 1.7. $ ruby-1.6 -v -e 'p "#{"Hello";""}"' ruby 1.6.8 (2002-12-02) [i686-linux] -e:1: warning: useless use of a literal in void context "" -- Nobu Nakada