Hi,
My name is Jon Babcock. I am editing the English translation of the
Ruby Book (ISBN 4-7561-3254-5 from ASCII).
I'm hoping it will be appropriate for me to ask questions about the
Ruby Book on this ML. If I should ask them of someone privately
instead, please let me know.
Thanks.
Ruby Book, Chapter 2 [[Eng. translation in double brackets.]]
2.14 文字列 [[Strings]]
...
文字列表現の中に引用符が現れる時にいちいちバックスラッシュを避けるため、
以下のような%を使った文字列表現もあります。
[[To put quotes into a string and avoid all the backslashes, there are
also the following kinds of strings using '%'.]]
%Q!Hello "World"\n! # "" の別形式(" をエスケープする必要がない)
%|Hello "World"\n| # “Q”は省略できる(区切り文字は任意の記号)
%q{Hello World} # '' の別形式(対応する括弧が区切りになる)
%x(date) # `` の別形式
%w(foo bar baz) # 配列 ["foo", "bar", "baz"]
[[ ... # an alternative double quotes syntax (no need to escape them)
... # the Q can be omitted (an arbitrary character can be used for seperation)
... # an alternative single quotes syntax (ends at the matching })
... # *QUESTION* -> What should I call `` here? 'left hand single
quotes' ? or just 'single quotes' again, or 'grave accents'??
... # the array ["foo", "bar", "baz"] ]]
IOW, should the 4th case above read:
a) ... # an alternative left hand single quotes syntax
b) ... # an alternative single quotes syntax
c ... # an alternative grave accents syntax
d ... # better idea ...
Once again, thank you all very much for allowing me to intrude. I have
quite a few questions like this. If I should ask them somewhere else,
please let me know.
Jon
--
Jon Babcock <jon / kanji.com>