File tree Expand file tree Collapse file tree 2 files changed +18
-2
lines changed Expand file tree Collapse file tree 2 files changed +18
-2
lines changed Original file line number Diff line number Diff line change 1
1
#!/usr/bin/env ruby
2
2
3
+ $VERBOSE = true
4
+
3
5
$LOAD_PATH. unshift ( "test" )
4
6
$LOAD_PATH. unshift ( "test/lib" )
5
7
$LOAD_PATH. unshift ( "lib" )
Original file line number Diff line number Diff line change @@ -222,13 +222,27 @@ def test_with_default_internal
222
222
end
223
223
end
224
224
225
+ def with_verbose ( verbose )
226
+ original = $VERBOSE
227
+ begin
228
+ $VERBOSE = verbose
229
+ yield
230
+ ensure
231
+ $VERBOSE = original
232
+ end
233
+ end
234
+
225
235
def with_default_internal ( encoding )
226
236
original = Encoding . default_internal
227
237
begin
228
- Encoding . default_internal = encoding
238
+ with_verbose ( false ) do
239
+ Encoding . default_internal = encoding
240
+ end
229
241
yield
230
242
ensure
231
- Encoding . default_internal = original
243
+ with_verbose ( false ) do
244
+ Encoding . default_internal = original
245
+ end
232
246
end
233
247
end
234
248
end
You can’t perform that action at this time.
0 commit comments