[rspec-users] Cucumber - but really ruby

Nicolás Sanguinetti godfoca at gmail.com
Tue Feb 3 15:46:23 EST 2009


Uh, seems my email never arrived? This is what I had written:

%w<delim><string><delim> == string.split(/\s+/) (maybe not exactly
that regexp, but basically it's an array of the words--hence the w)

%<delim><string><delim> == string, but without needing to escape the
quotes. It's the same as using %Q (ie, it understands escape sequences
and interpolated expressions inside, while %q is a literal string)

HTH
-foca

On Tue, Feb 3, 2009 at 5:52 PM, James Byrne <lists at ruby-forum.com> wrote:
> David Chelimsky wrote:
>> On Tue, Feb 3, 2009 at 1:10 PM, James Byrne <lists at ruby-forum.com>
>> wrote:
>>> James Byrne wrote:
>>>>
>>>> Thank you. What does %[...] do?
>>>
>>> This would not happen to be the same thing as %Q[..] would it?
>>
>> Nope.
>>
>> http://www.rubycentral.com/pickaxe/tut_stdtypes.html
>>
>> scroll down to strings
>
> I did. I can find nothing that discusses the %[] construct.
> --
> Posted via http://www.ruby-forum.com/.
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
>


More information about the rspec-users mailing list