ruby-changes:33253
From: zzak <ko1@a...>
Date: Fri, 14 Mar 2014 12:09:25 +0900 (JST)
Subject: [ruby-changes:33253] zzak:r45332 (trunk): * doc/syntax/literals.rdoc: [DOC] Single quote strings allows escape
zzak 2014-03-14 12:09:17 +0900 (Fri, 14 Mar 2014) New Revision: 45332 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=45332 Log: * doc/syntax/literals.rdoc: [DOC] Single quote strings allows escape of backslash as well, patch by @idupree [Fixes GH-553] [ci skip] https://github.com/ruby/ruby/pull/553 Modified files: trunk/ChangeLog trunk/doc/syntax/literals.rdoc Index: doc/syntax/literals.rdoc =================================================================== --- doc/syntax/literals.rdoc (revision 45331) +++ doc/syntax/literals.rdoc (revision 45332) @@ -100,7 +100,8 @@ single-quote strings: https://github.com/ruby/ruby/blob/trunk/doc/syntax/literals.rdoc#L100 '#{1 + 1}' #=> "\#{1 + 1}" In addition to disabling interpolation, single-quoted strings also disable all -escape sequences except for the single-quote (<tt>\'</tt>). +escape sequences except for the single-quote (<tt>\'</tt>) and backslash +(<tt>\\\\</tt>). You may also create strings using <tt>%</tt>: Index: ChangeLog =================================================================== --- ChangeLog (revision 45331) +++ ChangeLog (revision 45332) @@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Fri Mar 14 12:07:46 2014 Zachary Scott <e@z...> + + * doc/syntax/literals.rdoc: [DOC] Single quote strings allows escape + of backslash as well, patch by @idupree [Fixes GH-553] + https://github.com/ruby/ruby/pull/553 + Fri Mar 14 01:18:24 2014 Nobuyoshi Nakada <nobu@r...> * vm.c (invoke_block_from_c): add splattable argument. -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/