aboutsummaryrefslogtreecommitdiffstats
path: root/test/with_diffent_ofs.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-12-25 13:32:48 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-12-25 13:32:48 +0000
commit3e7c68119c1528f1589e53d9a795bc303dbddc1c (patch)
tree6a47a01e7c662997b80cd0e87443ad94e83700a8 /test/with_diffent_ofs.rb
parent7df8b94926b79f280ed0be387897fa3d0187fb44 (diff)
downloadruby-3e7c68119c1528f1589e53d9a795bc303dbddc1c.tar.gz
* test/digest/test_digest_extend.rb (TestDigestExtend#setup):
should not depend on the result of previous tests * test/with_diffent_ofs.rb (DifferentOFS::WithDifferentOFS): give name. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30368 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/with_diffent_ofs.rb')
-rw-r--r--test/with_diffent_ofs.rb11
1 files changed, 4 insertions, 7 deletions
diff --git a/test/with_diffent_ofs.rb b/test/with_diffent_ofs.rb
index c3f6a4acc7..3192da9d1f 100644
--- a/test/with_diffent_ofs.rb
+++ b/test/with_diffent_ofs.rb
@@ -8,15 +8,12 @@ module DifferentOFS
super
end
- mod = Module.new do
+ module WithDifferentOFS
def with_diffrent_ofs
- const_set(:DifferentOFS, Class.new(self).class_eval {include DifferentOFS}).name
end
end
- class << self; self; end.class_eval do
- define_method(:included) do |klass|
- super(klass)
- klass.extend(mod)
- end
+ def self.included(klass)
+ super(klass)
+ klass.const_set(:DifferentOFS, Class.new(klass).class_eval {include WithDifferentOFS}).name
end
end