Project

General

Profile

Actions

Bug #17589

closed

Pathname#each_line with chomp option raises TypeError

Added by scivola20 (sciv ola) about 3 years ago. Updated about 3 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 3.0.0p0 (2020-12-25 revision 95aff21468) [x86_64-darwin17]
[ruby-core:102280]

Description

With Ruby 3.0,

require "pathname"
Pathname(__FILE__).each_line(chomp: true){ }

causes

no implicit conversion of Hash into Integer (TypeError)

In case of Ruby 2.7.2, it does not raise but diplay:

warning: Using the last argument as keyword parameters is deprecated

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0