2017-06-20 07:10:37 -04:00
|
|
|
# frozen_string_literal: true
|
2010-12-25 08:08:07 -05:00
|
|
|
module DifferentOFS
|
2010-12-25 08:32:48 -05:00
|
|
|
module WithDifferentOFS
|
2010-12-25 21:15:55 -05:00
|
|
|
def setup
|
|
|
|
super
|
2019-04-18 17:56:55 -04:00
|
|
|
verbose, $VERBOSE = $VERBOSE, nil
|
2010-12-25 21:15:55 -05:00
|
|
|
@ofs, $, = $,, "-"
|
2019-04-18 17:56:55 -04:00
|
|
|
$VERBOSE = verbose
|
2010-12-25 21:15:55 -05:00
|
|
|
end
|
|
|
|
def teardown
|
2019-04-18 17:56:55 -04:00
|
|
|
verbose, $VERBOSE = $VERBOSE, nil
|
2010-12-25 21:15:55 -05:00
|
|
|
$, = @ofs
|
2019-04-18 17:56:55 -04:00
|
|
|
$VERBOSE = verbose
|
2010-12-25 21:15:55 -05:00
|
|
|
super
|
2010-12-25 08:08:07 -05:00
|
|
|
end
|
|
|
|
end
|
2010-12-25 21:15:55 -05:00
|
|
|
|
|
|
|
def self.extended(klass)
|
2010-12-25 08:32:48 -05:00
|
|
|
super(klass)
|
|
|
|
klass.const_set(:DifferentOFS, Class.new(klass).class_eval {include WithDifferentOFS}).name
|
2010-12-25 08:08:07 -05:00
|
|
|
end
|
|
|
|
end
|