aboutsummaryrefslogtreecommitdiffstats
path: root/test/lib/with_different_ofs.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/lib/with_different_ofs.rb')
-rw-r--r--test/lib/with_different_ofs.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/lib/with_different_ofs.rb b/test/lib/with_different_ofs.rb
new file mode 100644
index 0000000000..76dfa6896c
--- /dev/null
+++ b/test/lib/with_different_ofs.rb
@@ -0,0 +1,17 @@
+module DifferentOFS
+ module WithDifferentOFS
+ def setup
+ super
+ @ofs, $, = $,, "-"
+ end
+ def teardown
+ $, = @ofs
+ super
+ end
+ end
+
+ def self.extended(klass)
+ super(klass)
+ klass.const_set(:DifferentOFS, Class.new(klass).class_eval {include WithDifferentOFS}).name
+ end
+end