Project

General

Profile

Actions

Bug #6214

closed

warnings on inspect for Enumerator objects if $VERBOSE

Added by no6v (Nobuhiro IMAI) over 12 years ago. Updated over 12 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 2.0.0dev (2012-03-28 trunk 35155) [x86_64-linux]
Backport:
[ruby-dev:45449]

Description

Lazy なオブジェクトの inspect がわかりやすくなった反面、
$VERBOSE な時に警告が出るようです。

$ ruby -ve 'p "".bytes'
ruby 2.0.0dev (2012-03-28 trunk 35155) [x86_64-linux]
-e:1: warning: instance variable receiver not initialized
-e:1: warning: instance variable method not initialized
-e:1: warning: instance variable arguments not initialized
#<Enumerator: "":bytes>
$ ruby -ve 'p [].lazy'
ruby 2.0.0dev (2012-03-28 trunk 35155) [x86_64-linux]
-e:1: warning: instance variable arguments not initialized
#<Enumerator::Lazy: []>

xmpfilter を通す時に警告が表示されてちょっと困ります。

$ xmpfilter <(echo '[].lazy # =>')
[].lazy # => #<Enumerator::Lazy: []> # !> instance variable arguments not initialized


Files

no-warn-enum-inspect.patch (1.72 KB) no-warn-enum-inspect.patch no6v (Nobuhiro IMAI), 03/30/2012 10:50 PM
Actions

Also available in: Atom PDF

Like0
Like0Like0