-
Notifications
You must be signed in to change notification settings - Fork 223
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Eliminate warnings when ruby is in verbose/warning mode.
Eliminates these warnings: “…/lib/timecop/timecop.rb:110: warning: instance variable @safe_mode not initialized” “…lib/timecop/time_stack_item.rb:45: warning: instance variable @travel_offset not initialized” “…lib/timecop/time_stack_item.rb:49: warning: instance variable @scaling_factor not initialized” “lib/timecop/time_stack_item.rb:140: warning: mismatched indentations at 'end' with 'class' at 1” “…lib/timecop/time_extensions.rb:74: warning: method redefined; discarding old now.” For the method redefinition warning, could have used `undef :now’, but seems cleaner instead to alias :now_without_mock_time to be the old :now, rather than coding up an equivalent. (Same pattern as used in Time in the same file)
- Loading branch information
Showing
4 changed files
with
7 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -107,7 +107,7 @@ def safe_mode=(safe) | |
end | ||
|
||
def safe_mode? | ||
false || @safe_mode | ||
@safe_mode ||= false | ||
end | ||
|
||
private | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters