1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* enumerator.c (inspect_enumerator): suppress uninitialized

instance variable warnings.  [ruby-dev:45449][Bug #6214]
  patched by no6v (Nobuhiro IMAI).


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35218 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2012-04-03 01:18:31 +00:00
parent ecabd16923
commit 63e8110bfc
3 changed files with 16 additions and 3 deletions

View file

@ -1,4 +1,5 @@
require 'test/unit'
require_relative 'envutil'
class TestEnumerator < Test::Unit::TestCase
def setup
@ -358,6 +359,12 @@ class TestEnumerator < Test::Unit::TestCase
e.inspect)
end
def test_inspect_verbose
bug6214 = '[ruby-dev:45449]'
assert_warn("", bug6214) { "".bytes.inspect }
assert_warn("", bug6214) { [].lazy.inspect }
end
def test_generator
# note: Enumerator::Generator is a class just for internal
g = Enumerator::Generator.new {|y| y << 1 << 2 << 3; :foo }