aboutsummaryrefslogtreecommitdiffstats
path: root/test/with_diffent_ofs.rb
diff options
context:
space:
mode:
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