Commit graph

22 commits

Author SHA1 Message Date
Nobuyoshi Nakada
8f54b5bb93 [ruby/uri] [DOC] Update old use of URI::Parser
d2a79c6343
2025-07-14 05:11:58 +00:00
Nobuyoshi Nakada
d147091418 [ruby/uri] [DOC] Document private visibility too
For the references to URI::RFC2396_Parser private methods.

372fbb455d
2025-07-14 05:11:58 +00:00
Nobuyoshi Nakada
1a03270a7e [ruby/uri] [DOC] Fix references
These are instance methods, not class methods.  And `URI::Parser` was
moved to URI::RFC2396_Parser at [r46491]

[r46491]: bb83f32dc3

452d74390c
2025-07-14 05:11:58 +00:00
Nobuyoshi Nakada
f1764623db [ruby/uri] Make URI::regexp schemes case sensitive
(https://github.com/ruby/uri/pull/38)

0c2b6468fa
2025-07-12 03:24:15 +00:00
Nobuyoshi Nakada
881924f259 [ruby/uri] [DOC] Make documentation 100%
fe7aa3dac2
2025-01-24 01:45:08 +00:00
Hiroshi SHIBATA
310e6603a2 [ruby/uri] Check existence constants only URI module
b6f583369a
2024-11-14 03:32:13 +00:00
Hiroshi SHIBATA
1d6c986104 [ruby/uri] Restore constants like URI::REGEXP::PATTERN::IPV6ADDR
ee9a38701a
2024-11-14 02:20:04 +00:00
Josh Soref
9d86864a6d [ruby/uri] Add space after bad URI
9f2c7ed5f2
2024-08-05 08:15:56 +00:00
Nobuyoshi Nakada
1eff362492 [ruby/uri] Fix quadratic backtracking on invalid relative URI
https://hackerone.com/reports/1958260

9010ee2536
2023-06-29 01:07:51 +00:00
Jeremy Evans
10ad81eb2d [ruby/uri] Only use UnboundMethod#bind_call if it is available
This allows tests to pass on Ruby 2.4-2.6.

Fixes #19

67ca99ca87
2021-04-22 14:54:47 +09:00
aycabta
66d2fc7989 Enclose the code that was accidentally a link in "tt" 2021-03-31 15:18:52 +09:00
David Rodríguez
9e8d75e881
[ruby/uri] Remove RCS keywords
1bcb1203ad
2020-03-26 18:06:14 +09:00
Samuel Williams
844ff7ea45
[ruby/uri] Simplify construction of URI instances using parser interface.
c145017dd7
2020-03-26 18:06:14 +09:00
Kazuhiro NISHIYAMA
d6c80876b7
Use bind_call instead of bind and call 2019-10-11 13:50:27 +09:00
kazu
6509c1781c [DOC] Fix capitallizing [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63260 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-04-25 14:00:47 +00:00
stomar
300b22dc22 Improve docs for URI library
* lib/uri/generic.rb: [DOC] fix invalid example code to make it
  syntax highlighted; drop unnecessary `puts', `p'; adapt to current
  inspect format without Object id; do not display unnecessary return
  values in examples; fix or prevent unintended description lists;
  fix broken RDoc; fix grammar and typos.

* lib/uri.rb: ditto.
* lib/uri/common.rb: ditto.
* lib/uri/file.rb: ditto.
* lib/uri/ftp.rb: ditto.
* lib/uri/http.rb: ditto.
* lib/uri/ldap.rb: ditto.
* lib/uri/mailto.rb: ditto.
* lib/uri/rfc2396_parser.rb: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63228 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-04-21 20:04:05 +00:00
naruse
234a30459c set UTF-8 if given URI string is ASCII
Now URI is normally UTF-8, and US-ASCII URI string is considered as
escaped a UTF-8 string.
https://github.com/rails/rails/issues/32294

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62897 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-22 11:20:03 +00:00
naruse
6db869c101 fix error if the input is mixed Unicode and percent-escapes
Reported by kivikakk (Ashe Connor) with tests and doc fix
Patch based on mame and fix by naruse
[Bug #14586]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62695 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-08 09:38:01 +00:00
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
naruse
8c7310e713 * lib/uri/rfc2396_parser.rb (initialize_pattern):
URI::Generic.build should accept port as a string.
  pattern[:PORT] is not defined for long.
  by Dave Slutzkin <daveslutzkin@fastmail.fm>
  https://github.com/ruby/ruby/pull/804 fix GH-804

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50537 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-19 02:34:47 +00:00
normal
f83116e620 lib/uri/rfc2396_parser.rb (initialize): reduce bytecode size
Reduce the initialize method from 2088 to 1332 bytes on 32-bit x86
Measurement obtained using `memsize_of_all', as `memsize_of'
is non-recursive:

  a = ObjectSpace.memsize_of_all(RubyVM::InstructionSequence)
  RubyVM::InstructionSequence.compile(src)
  b = ObjectSpace.memsize_of_all(RubyVM::InstructionSequence)
  p(b - a)

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48292 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-06 01:14:15 +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