naruse
3e92b635fb
Add frozen_string_literal: false for all files
...
When you change this to true, you may need to add more tests.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-16 05:07:31 +00:00
normal
aa93c62e3c
lib/uri: performance improvements [misc #10628 ]
...
* lib/uri/generic.rb (split_userinfo): fstring for 1-byte split
(set_port): reduce bytecode size
(check_path): reduce garbage via opt_str_freeze
(query=): ditto
(fragment=): ditto
[misc #10628 ]
* lib/uri/rfc3986_parser.rb (regexp): cache as attr
(initialize): setup and freeze regexp attr once
(split): reduce bytecode size, use opt_str_freeze
(parse): minor bytecode and garbage reduction
(default_regexp): rename for initialize
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48980 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-24 23:50:37 +00:00
naruse
21ab98a997
* lib/uri/rfc3986_parser.rb (URI::RFC3986_Parser::RFC3986_URI):
...
allow '[' and ']' for URI input (and escape). [Bug #10402 ]
* lib/uri/generic.rb (URI#query=): escape '[', '\', and ']'.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48244 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-03 00:33:47 +00:00
glass
a4645e5612
* lib/uri/rfc3986_parser.rb: raise URI::InvalidURIError when
...
uri doesn't respond to #to_str. [ruby-core:64453] [Bug #10150 ]
* test/uri/test_parser.rb: test for above.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47721 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-27 03:13:22 +00:00
naruse
e37aab94da
* lib/uri/rfc3986_parser.rb: specify a regexp for :OPAQUE; generic.rb
...
assumes it is present, and will refuse all values otherwise.
by Matthew Draper <matthew@trebex.net>
https://github.com/ruby/ruby/pull/718 fix GH-718
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47614 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-17 14:15:03 +00:00
naruse
48559765b1
remove useless part of regexp
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46624 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-30 10:06:25 +00:00
naruse
e02eb253e7
* lib/uri/generic.rb (check_port): allow strings for port= as
...
described in rdoc.
* lib/uri/rfc3986_parser.rb (regexp): implementation detail of above.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46504 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-23 03:18:51 +00:00
naruse
b757ff3ef6
* lib/uri/rfc3986_parser.rb: raise exception when given a URI string has non ASCII.
...
It is to keep the regexp compiled for US-ASCII.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46493 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-22 00:23:52 +00:00
naruse
bb83f32dc3
support RFC3986 [Feature #2542 ]
...
* lib/uri/common.rb (URI::REGEXP): move to lib/uri/rfc2396_parser.rb.
* lib/uri/common.rb (URI::Parser): ditto.
* lib/uri/common.rb (URI.split): use RFC3986_Parser.
* lib/uri/common.rb (URI.parse): ditto.
* lib/uri/common.rb (URI.join): ditto.
* lib/uri/common.rb (URI.extract): deprecated.
* lib/uri/common.rb (URI.regexp): ditto.
* lib/uri/rfc2396_parser.rb: added.
* lib/uri/rfc3986_parser.rb: added.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46491 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-22 00:22:19 +00:00