Skip to content
Browse files

proper scoping on entry exceptions

  • Loading branch information...
1 parent 2560331 commit c27d16ed7ab2f27f3ad5a1138575fca376abc1c4 @adamwiggins committed Mar 5, 2009
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/rush/entry.rb
View
4 lib/rush/entry.rb
@@ -94,7 +94,7 @@ def rename(new_name)
# will not be affected, but a new object representing the newly-created
# entry will be returned.
def duplicate(new_name)
- raise NameCannotContainSlash if new_name.match(/\//)
+ raise Rush::NameCannotContainSlash if new_name.match(/\//)
new_full_path = "#{@path}/#{new_name}"
connection.copy(full_path, new_full_path)
self.class.new(new_full_path, box)
@@ -103,7 +103,7 @@ def duplicate(new_name)
# Copy the entry to another dir. Returns an object representing the new
# copy.
def copy_to(dir)
- raise NotADir unless dir.class == Rush::Dir
+ raise Rush::NotADir unless dir.class == Rush::Dir
if box == dir.box
connection.copy(full_path, dir.full_path)

0 comments on commit c27d16e

Please sign in to comment.
Something went wrong with that request. Please try again.