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

Updated by nobu (Nobuyoshi Nakada) about 3 years ago

  • Backport changed from 2.5: UNKNOWN, 2.6: UNKNOWN, 2.7: UNKNOWN, 3.0: UNKNOWN to 2.5: DONTNEED, 2.6: DONTNEED, 2.7: REQUIRED, 3.0: REQUIRED
Actions #2

Updated by nobu (Nobuyoshi Nakada) about 3 years ago

  • Status changed from Open to Closed

Applied in changeset git|9241211538189a58b477bd55b539357617fd42ed.


Forward keyword arguments for Pathname#each_line [Bug #17589]

Updated by naruse (Yui NARUSE) about 3 years ago

  • Backport changed from 2.5: DONTNEED, 2.6: DONTNEED, 2.7: REQUIRED, 3.0: REQUIRED to 2.5: DONTNEED, 2.6: DONTNEED, 2.7: REQUIRED, 3.0: DONE

ruby_3_0 3cebc709539c9d0ac5bf0b7b280ec74c8029815f merged revision(s) 9241211538189a58b477bd55b539357617fd42ed.

Actions #4

Updated by nagachika (Tomoyuki Chikanaga) about 3 years ago

  • Backport changed from 2.5: DONTNEED, 2.6: DONTNEED, 2.7: REQUIRED, 3.0: DONE to 2.5: DONTNEED, 2.6: DONTNEED, 2.7: DONE, 3.0: DONE

ruby_2_7 0cfd491732162eab61227ac4b49617c37ddbb316 merged revision(s) 9241211538189a58b477bd55b539357617fd42ed.

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0