Forum: Ruby simple strings... %q this_is_shown_in_pickaxe_but_dont_work;

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
508861510639b56d61eb30e6a28b01d9?d=identicon&s=25 John Maclean (Guest)
on 2006-02-19 12:51
(Received via mailing list)
The title says it all. Going through chapter 22 of pickaxe (p320).
%q (this is some string, you dont need quotes)

%q this_type_is_shown_in_the_book;

the latter method does not work for me. Any clues as to why?
430ea1cba106cc65b7687d66e9df4f06?d=identicon&s=25 David Vallner (Guest)
on 2006-02-19 13:48
(Received via mailing list)
DÅ?a Nedeľa 19 Február 2006 12:50 John Maclean napísal:
> The title says it all. Going through chapter 22 of pickaxe (p320).
> %q (this is some string, you dont need quotes)
>
> %q this_type_is_shown_in_the_book;
>
> the latter method does not work for me. Any clues as to why?

You changed the code and didn't put a single space after the statement?
Could
have happened if you have the printed version. That's what ends the
generic
delimited form in the second example.
This topic is locked and can not be replied to.