On Thursday, May 12, 2011 1:10:16 PM UTC-6, Ruby-Forum.com User wrote:
>
> Hi,
> When I try this on IRB it works fine as follows:
>
> >>/\A[\w+\-.!#$\%&'*\/\=?...@[a-z\d\-.]+\.[a-z]+\z/.match("jd!#$\%&'*+-/=?^_`{|}~
> [email protected]")
> => #<MatchData "jd!%&'*+-/=?^_`{|}[email protected]">
>
> When I try it through my Ruby on Rails program I get a nil. Any idea
> what is
> happening?
>
I think the follow-up question we all have is what do you specifically mean 
by "when I try it through by Ruby on Rails program."

In other words, what is the context or surrounding code in which you "try 
it" within your rails app? This likely has a large bearing on any answer 
anyone can give you. I just ruled out the possibility of it being a 
variations in ruby versions (RVM is handy for that). Specifically, it works 
using irb (just as you said) in jruby (1.5.3), ree (2010.02), 1.8.7-p302 and 
1.9.2-p0. It even works in 1.8.6-p399 and 1.9.1-p378.

That leaves rails context. We need code!

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to