Project

General

Profile

Actions

Bug #10774

closed

Regression: URI::MAilTo#to_mailtext - undefined method unescape for URI::RFC3986_Parser

Added by dmke (Dominik Menke) about 9 years ago. Updated about 7 years ago.

Status:
Closed
Assignee:
-
Target version:
-
[ruby-core:67763]

Description

Using this example: https://github.com/ruby/ruby/blob/ruby_2_2/lib/uri/mailto.rb#L257-L259

Ruby 2.2.0:

$ ruby -v                               
ruby 2.2.0p0 (2014-12-25 revision 49005) [x86_64-linux]
$ ruby -ruri -e 'puts URI.parse("mailto:ruby-list@ruby-lang.org?Subject=subscribe&cc=myaddr").to_mailtext'
/home/dm/.rbenv/versions/2.2.0/lib/ruby/2.2.0/uri/mailto.rb:262:in `to_mailtext': undefined method `unescape' for #<URI::RFC3986_Parser:0x007f11ec3c1c20> (NoMethodError)
	from -e:1:in `<main>'

Compare to Ruby 2.1.5:

$ ruby -v
ruby 2.1.5p273 (2014-11-13 revision 48405) [x86_64-linux]
$ ruby -ruri -e 'puts URI.parse("mailto:ruby-list@ruby-lang.org?Subject=subscribe&cc=myaddr").to_mailtext'
To: ruby-list@ruby-lang.org
Subject: subscribe
Cc: myaddr



Ruby trunk:

$ ruby -v                                                                                                 
ruby 2.3.0dev (2015-01-23 trunk 49388) [x86_64-linux]
$ ruby -ruri -e 'puts URI.parse("mailto:ruby-list@ruby-lang.org?Subject=subscribe&cc=myaddr").to_mailtext'
/home/dm/.rbenv/versions/2.3.0-dev/lib/ruby/2.3.0/uri/mailto.rb:266:in `to_mailtext': undefined method `unescape' for #<URI::RFC3986_Parser:0x007f1585094e70> (NoMethodError)
	from -e:1:in `<main>'

Files

bug10774.patch (769 Bytes) bug10774.patch dmke (Dominik Menke), 01/23/2015 11:25 AM

Updated by dmke (Dominik Menke) about 9 years ago

I've created a failing test for this.

Updated by rbu (Robert Buchholz) over 7 years ago

This is still happening on trunk/2.4 previews. Any news of getting this fixed after over two years? After all, it makes this function fail in all cases. This blocks migration of an existing codebase from Ruby 2.1 for me.

Actions #3

Updated by naruse (Yui NARUSE) over 7 years ago

  • Status changed from Open to Closed

Applied in changeset r57066.


Use URI.decode_www_form_component [Bug #10774]

parser refered RFC2396_Parser, but it is separated.
test is contributed by Dominik Menke

Updated by nagachika (Tomoyuki Chikanaga) over 7 years ago

  • Backport changed from 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN to 2.1: DONTNEED, 2.2: DONTNEED, 2.3: REQUIRED

Updated by nagachika (Tomoyuki Chikanaga) about 7 years ago

  • Backport changed from 2.1: DONTNEED, 2.2: DONTNEED, 2.3: REQUIRED to 2.1: DONTNEED, 2.2: DONTNEED, 2.3: DONE

ruby_2_3 r58147 merged revision(s) 56139,57066,57099,57100.

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0