From 23980c8ba0a7e332204da31ba2b8ad5ae134c9c6 Mon Sep 17 00:00:00 2001 From: nobu Date: Thu, 17 Jan 2008 16:59:23 +0000 Subject: * bootstraptest/test_attr.rb: moved test for [ruby-core:14641]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15093 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- bootstraptest/test_attr.rb | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'bootstraptest/test_attr.rb') diff --git a/bootstraptest/test_attr.rb b/bootstraptest/test_attr.rb index c70e2c21a6..721a847145 100644 --- a/bootstraptest/test_attr.rb +++ b/bootstraptest/test_attr.rb @@ -1,3 +1,29 @@ +assert_equal 'ok', %q{ + module M + class A + class << self + attr_accessor :at + def workflow_rule + yield self + end + + def eval_str(str) + eval(str) + end + end + end + end + begin + M::A.eval_str(<<-END) + workflow_rule do |r| + r.at 1 + end + END + rescue ArgumentError => e + print "ok" + end +}, '[ruby-core:14641]' + assert_equal %{ok}, %{ class A attr :m -- cgit v1.2.3