Project

General

Profile

Actions

Bug #13835

closed

Using 'open-uri' with 'tempfile' causes an exception

Added by thorsteneckel (Thorsten Eckel) over 6 years ago. Updated over 4 years ago.

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

Description

Hi there,

try this in your current ruby env:

require 'tempfile'
require 'open-uri'

temp_file = Tempfile.new
open(temp_file, 'a')

Get this:

/Users/~/.rvm/rubies/ruby-2.4.1/lib/ruby/2.4.0/tempfile.rb:142:in `open': wrong number of arguments (given 1, expected 0) (ArgumentError)
  from /Users/~/.rvm/rubies/ruby-2.4.1/lib/ruby/2.4.0/open-uri.rb:31:in `open'
  from debug.rb:5:in `<main>'

I created the pull request https://github.com/ruby/ruby/pull/1680 as a proposal. It's based on the previous pull request https://github.com/ruby/ruby/pull/1675 and feedback of @nobu (Nobuyoshi Nakada) .

Greetings.

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0