summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/psych/test_yaml.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/psych/test_yaml.rb b/test/psych/test_yaml.rb
index 41bb377143a..807c058d2e4 100644
--- a/test/psych/test_yaml.rb
+++ b/test/psych/test_yaml.rb
@@ -3,6 +3,7 @@
# $Id$
#
require 'psych/helper'
+require 'ostruct'
# [ruby-core:01946]
module Psych_Tests
@@ -14,6 +15,12 @@ class Psych_Unit_Tests < Psych::TestCase
Psych.domain_types.clear
end
+ def test_y_method
+ assert_raises(NoMethodError) do
+ OpenStruct.new.y 1
+ end
+ end
+
def test_syck_compat
time = Time.utc(2010, 10, 10)
yaml = Psych.dump time