summaryrefslogtreecommitdiff
path: root/test/lib/with_different_ofs.rb
diff options
context:
space:
mode:
authorhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-06-26 09:27:22 +0000
committerhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-06-26 09:27:22 +0000
commit767358108ecfd71055f6c75d14f439f3b6b43efb (patch)
tree6bdf6712d86799841db65423fb3178fb3e613454 /test/lib/with_different_ofs.rb
parent4af87bd672eca5a4ba6c11d931d4bf433be19312 (diff)
* test/with_different_ofs.rb: move into test library directory.
* test/csv/base.rb: fix require path for with_different_ofs.rb. * test/digest/test_digest_extend.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46563 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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 0000000..76dfa68
--- /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