From: Shri Borde Date: 2009-02-06T02:54:44+09:00 Subject: [ruby-core:21860] Re: What does this regexp mean - /\c#{_J}/ Actually, with strings, the regexp is evaluated at the very end after substituting all the variables. So this should have actually worked. Here is the spec I will add. The not_compliant_on(:ruby) means that it is a Ruby bug it "allows substitution to interact with other Regexp constructs" do str = "foo)|(bar" /(#{str})/.should == /(foo)|(bar)/ str = "a" /[#{str}-z]/.should == /[a-z]/ not_compliant_on(:ruby) do str = "J" re = /\c#{str}/.should == /\cJ/ end end -----Original Message----- From: Shri Borde Sent: Wednesday, February 04, 2009 3:33 PM To: ruby-core@ruby-lang.org Subject: RE: [ruby-core:21839] Re: What does this regexp mean - /\c#{_J}/ Makes sense -----Original Message----- From: Charles.O.Nutter@sun.com [mailto:Charles.O.Nutter@sun.com] On Behalf Of Charles Oliver Nutter No warnings in JRuby but we appear to do the same thing. Parser artifact no doubt...I'd call it a bug. - Charlie