[#66126] Creation/Conversion methods/functions table for Ruby types — SASADA Koichi <ko1@...>
Hi,
5 messages
2014/11/07
[#66248] [ruby-trunk - Feature #10423] [PATCH] opt_str_lit*: avoid literal string allocations — normalperson@...
Issue #10423 has been updated by Eric Wong.
3 messages
2014/11/13
[#66595] [ruby-trunk - Bug #10557] [Open] Block not given when the argument is a string — bartosz@...
Issue #10557 has been reported by Bartosz Kopinski.
3 messages
2014/11/30
[ruby-core:66060] Re: [ruby-cvs:55394] naruse:r48244 (trunk): * lib/uri/rfc3986_parser.rb (URI::RFC3986_Parser::RFC3986_URI):
From:
Eric Wong <normalperson@...>
Date:
2014-11-03 02:39:13 UTC
List:
ruby-core #66060
naruse@ruby-lang.org wrote:
> http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=48244
--- a/lib/uri/generic.rb
+++ b/lib/uri/generic.rb
@@ -851,7 +851,7 @@ module URI
v.encode!(Encoding::UTF_8) rescue nil
v.delete!("\t\r\n")
v.force_encoding(Encoding::ASCII_8BIT)
- v.gsub!(/(?!%\h\h|[!$-&(-;=?-_a-~])./n){'%%%02X' % $&.ord}
+ v.gsub!(/(?!%\h\h|[!$-&(-;=?-Z_a-~])./n.freeze){'%%%02X'.freeze % $&.ord}
v.force_encoding(Encoding::US_ASCII)
@query = v
end
freeze a literal regexp? I'm not familiar with regexp code,
so I'm wondering if there is a good reason for this. Thanks.
Btw, I hope the freeze for String#% can be removed soon: [Feature #10423]