[#80531] Re: [ruby-cvs:65407] normal:r58236 (trunk): thread.c: comments on M:N threading [ci skip] — Eric Wong <normalperson@...>

SASADA Koichi <ko1@ruby-lang.org> wrote:

24 messages 2017/04/02
[#80532] Re: [ruby-cvs:65407] normal:r58236 (trunk): thread.c: comments on M:N threading [ci skip] — SASADA Koichi <ko1@...> 2017/04/02

On 2017/04/02 11:35, Eric Wong wrote:

[#80540] Re: [ruby-cvs:65407] normal:r58236 (trunk): thread.c: comments on M:N threading [ci skip] — Eric Wong <normalperson@...> 2017/04/03

SASADA Koichi <ko1@atdot.net> wrote:

[#81027] Re: [ruby-cvs:65407] normal:r58236 (trunk): thread.c: comments on M:N threading [ci skip] — Eric Wong <normalperson@...> 2017/05/08

Eric Wong <normalperson@yhbt.net> wrote:

[#81028] Re: [ruby-cvs:65407] normal:r58236 (trunk): thread.c: comments on M:N threading [ci skip] — SASADA Koichi <ko1@...> 2017/05/08

On 2017/05/08 9:33, Eric Wong wrote:

[#81029] Re: [ruby-cvs:65407] normal:r58236 (trunk): thread.c: comments on M:N threading [ci skip] — SASADA Koichi <ko1@...> 2017/05/08

On 2017/05/08 10:53, SASADA Koichi wrote:

[#81031] Re: [ruby-cvs:65407] normal:r58236 (trunk): thread.c: comments on M:N threading [ci skip] — Eric Wong <normalperson@...> 2017/05/08

SASADA Koichi <ko1@atdot.net> wrote:

[#81033] Re: [ruby-cvs:65407] normal:r58236 (trunk): thread.c: comments on M:N threading [ci skip] — SASADA Koichi <ko1@...> 2017/05/08

On 2017/05/08 12:01, Eric Wong wrote:

[#81035] Re: [ruby-cvs:65407] normal:r58236 (trunk): thread.c: comments on M:N threading [ci skip] — Eric Wong <normalperson@...> 2017/05/08

SASADA Koichi <ko1@atdot.net> wrote:

[#81042] Re: [ruby-cvs:65407] normal:r58236 (trunk): thread.c: comments on M:N threading [ci skip] — SASADA Koichi <ko1@...> 2017/05/09

On 2017/05/08 15:36, Eric Wong wrote:

[#81044] Re: [ruby-cvs:65407] normal:r58236 (trunk): thread.c: comments on M:N threading [ci skip] — Eric Wong <normalperson@...> 2017/05/09

SASADA Koichi <ko1@atdot.net> wrote:

[#81045] Re: [ruby-cvs:65407] normal:r58236 (trunk): thread.c: comments on M:N threading [ci skip] — SASADA Koichi <ko1@...> 2017/05/09

On 2017/05/09 12:38, Eric Wong wrote:

[#81047] Re: [ruby-cvs:65407] normal:r58236 (trunk): thread.c: comments on M:N threading [ci skip] — Eric Wong <normalperson@...> 2017/05/09

SASADA Koichi <ko1@atdot.net> wrote:

[ruby-core:80591] [Ruby trunk Bug#13406] URI.parse

From: shahkrunalm@...
Date: 2017-04-06 06:55:07 UTC
List: ruby-core #80591
Issue #13406 has been reported by shahkrunalm (Krunal Shah).

----------------------------------------
Bug #13406: URI.parse
https://bugs.ruby-lang.org/issues/13406

* Author: shahkrunalm (Krunal Shah)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: 2.4.1
* Backport: 2.2: UNKNOWN, 2.3: UNKNOWN, 2.4: UNKNOWN
----------------------------------------
Previously we were using
ruby '2.1.9'
rails '4.1.1'

uri = URI.parse("http://" + 'abc.com') # Here, domain name abc.com is provided using single quotation.

This was throwing exception as domain name is invalid as it contain single quotation and that's what we want

Following is the stack trace

2.1.9 :001 > a = '\'abc.com\''
 => "'abc.com'" 
2.1.9 :002 > URI.parse("http://" + a)
URI::InvalidURIError: the scheme http does not accept registry part: 'abc.com' (or bad hostname?)
	from /usr/local/rvm/rubies/ruby-2.1.9/lib/ruby/2.1.0/uri/generic.rb:214:in `initialize'
	from /usr/local/rvm/rubies/ruby-2.1.9/lib/ruby/2.1.0/uri/common.rb:214:in `new'
	from /usr/local/rvm/rubies/ruby-2.1.9/lib/ruby/2.1.0/uri/common.rb:214:in `parse'
	from /usr/local/rvm/rubies/ruby-2.1.9/lib/ruby/2.1.0/uri/common.rb:747:in `parse'
	from (irb):2
	from /usr/local/rvm/gems/ruby-2.1.9@clearstream/gems/railties-4.1.1/lib/rails/commands/console.rb:90:in `start'
	from /usr/local/rvm/gems/ruby-2.1.9@clearstream/gems/railties-4.1.1/lib/rails/commands/console.rb:9:in `start'
	from /usr/local/rvm/gems/ruby-2.1.9@clearstream/gems/railties-4.1.1/lib/rails/commands/commands_tasks.rb:69:in `console'
	from /usr/local/rvm/gems/ruby-2.1.9@clearstream/gems/railties-4.1.1/lib/rails/commands/commands_tasks.rb:40:in `run_command!'
	from /usr/local/rvm/gems/ruby-2.1.9@clearstream/gems/railties-4.1.1/lib/rails/commands.rb:17:in `<top (required)>'
	from bin/rails:8:in `require'
	from bin/rails:8:in `<main>'


Now, we have upgraded to 
ruby '2.4.1'
rails '5.0.2'

uri = URI.parse("http://" + 'abc.com') 

Now, it doesn't throw any exception and allows domain name with single quotation.

2.4.1 :005 > a = '\'abc.com\''
 => "'abc.com'" 
2.4.1 :006 > URI.parse("http://" + a)
 => #<URI::HTTP http://'abc.com'> 
2.4.1 :007 > 



-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>

In This Thread

Prev Next