summaryrefslogtreecommitdiff
path: root/test/ruby/test_struct.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_struct.rb')
-rw-r--r--test/ruby/test_struct.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/ruby/test_struct.rb b/test/ruby/test_struct.rb
index b3191902a3..03cb55999c 100644
--- a/test/ruby/test_struct.rb
+++ b/test/ruby/test_struct.rb
@@ -1,3 +1,4 @@
+# -*- coding: us-ascii -*-
require 'test/unit'
require 'timeout'
require_relative 'envutil'
@@ -117,6 +118,10 @@ class TestStruct < Test::Unit::TestCase
klass = Struct.new(:a, :b)
o = klass.new(1, 2)
assert_equal([[:a, 1], [:b, 2]], o.each_pair.to_a)
+ bug7382 = '[ruby-dev:46533]'
+ a = []
+ o.each_pair {|x| a << x}
+ assert_equal([[:a, 1], [:b, 2]], a, bug7382)
end
def test_inspect