mirror of
https://github.com/ruby/ruby.git
synced 2025-09-20 19:14:00 +02:00
merge revision(s) 34214:
* lib/uri/common.rb (URI::Parser#initialize_regexp): use \A \z instead of ^ $. [Bug #5843] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34761 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
9efce27a62
commit
6cd700f3e9
4 changed files with 17 additions and 11 deletions
|
@ -1,3 +1,8 @@
|
|||
Thu Feb 23 14:44:36 2012 NARUSE, Yui <naruse@ruby-lang.org>
|
||||
|
||||
* lib/uri/common.rb (URI::Parser#initialize_regexp):
|
||||
use \A \z instead of ^ $. [Bug #5843]
|
||||
|
||||
Thu Feb 23 08:08:23 2012 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||
|
||||
* win32/win32.c (rb_w32_uchmod): typo. [Bug#5671] [ruby-dev:44898]
|
||||
|
|
|
@ -514,16 +514,16 @@ module URI
|
|||
ret[:UNSAFE] = Regexp.new("[^#{pattern[:UNRESERVED]}#{pattern[:RESERVED]}]")
|
||||
|
||||
# for Generic#initialize
|
||||
ret[:SCHEME] = Regexp.new("^#{pattern[:SCHEME]}$")
|
||||
ret[:USERINFO] = Regexp.new("^#{pattern[:USERINFO]}$")
|
||||
ret[:HOST] = Regexp.new("^#{pattern[:HOST]}$")
|
||||
ret[:PORT] = Regexp.new("^#{pattern[:PORT]}$")
|
||||
ret[:OPAQUE] = Regexp.new("^#{pattern[:OPAQUE_PART]}$")
|
||||
ret[:REGISTRY] = Regexp.new("^#{pattern[:REG_NAME]}$")
|
||||
ret[:ABS_PATH] = Regexp.new("^#{pattern[:ABS_PATH]}$")
|
||||
ret[:REL_PATH] = Regexp.new("^#{pattern[:REL_PATH]}$")
|
||||
ret[:QUERY] = Regexp.new("^#{pattern[:QUERY]}$")
|
||||
ret[:FRAGMENT] = Regexp.new("^#{pattern[:FRAGMENT]}$")
|
||||
ret[:SCHEME] = Regexp.new("\\A#{pattern[:SCHEME]}\\z")
|
||||
ret[:USERINFO] = Regexp.new("\\A#{pattern[:USERINFO]}\\z")
|
||||
ret[:HOST] = Regexp.new("\\A#{pattern[:HOST]}\\z")
|
||||
ret[:PORT] = Regexp.new("\\A#{pattern[:PORT]}\\z")
|
||||
ret[:OPAQUE] = Regexp.new("\\A#{pattern[:OPAQUE_PART]}\\z")
|
||||
ret[:REGISTRY] = Regexp.new("\\A#{pattern[:REG_NAME]}\\z")
|
||||
ret[:ABS_PATH] = Regexp.new("\\A#{pattern[:ABS_PATH]}\\z")
|
||||
ret[:REL_PATH] = Regexp.new("\\A#{pattern[:REL_PATH]}\\z")
|
||||
ret[:QUERY] = Regexp.new("\\A#{pattern[:QUERY]}\\z")
|
||||
ret[:FRAGMENT] = Regexp.new("\\A#{pattern[:FRAGMENT]}\\z")
|
||||
|
||||
ret
|
||||
end
|
||||
|
|
|
@ -692,6 +692,7 @@ class URI::TestGeneric < Test::Unit::TestCase
|
|||
|
||||
uri = URI.parse('http://example.com')
|
||||
assert_raise(URI::InvalidURIError) { uri.password = 'bar' }
|
||||
assert_raise(URI::InvalidComponentError) { uri.query = "foo\nbar" }
|
||||
uri.userinfo = 'foo:bar'
|
||||
assert_equal('http://foo:bar@example.com', uri.to_s)
|
||||
assert_raise(URI::InvalidURIError) { uri.registry = 'bar' }
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#define RUBY_VERSION "1.9.3"
|
||||
#define RUBY_PATCHLEVEL 140
|
||||
#define RUBY_PATCHLEVEL 141
|
||||
|
||||
#define RUBY_RELEASE_DATE "2012-02-23"
|
||||
#define RUBY_RELEASE_YEAR 2012
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue