lib/alexandria/undo_manager.rb in alexandria-book-collection-manager-0.6.9 vs lib/alexandria/undo_manager.rb in alexandria-book-collection-manager-0.7.0
- old
+ new
@@ -32,14 +32,14 @@
(@within_undo ? @redo_actions : @undo_actions) << block
notify
end
def can_undo?
- @undo_actions.length > 0
+ !@undo_actions.empty?
end
def can_redo?
- @redo_actions.length > 0
+ !@redo_actions.empty?
end
def undo!
@within_undo = true
begin