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!#$\%&''*+-/=?^_`{|}~
> o...-PV5Ro7/Mrj4@public.gmane.org")
> => #<MatchData
"jd!%&''*+-/=?^_`{|}~o...-PV5Ro7/Mrj4@public.gmane.org">
>
> 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
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.