projects
/
redact.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Some cosmetic changes.
[redact.git]
/
lib
/
redact
/
part.rb
diff --git
a/lib/redact/part.rb
b/lib/redact/part.rb
index 4d6cf9f5e410f230580bb7c40cec08c1dea2b71d..b1b99786a179513975f302b1d6f17b9272b6c1df 100644
(file)
--- a/
lib/redact/part.rb
+++ b/
lib/redact/part.rb
@@
-1,5
+1,5
@@
#--
#--
-# $Id: part.rb
19 2005-04-02 22:05:24
Z tilman $
+# $Id: part.rb
20 2005-04-02 22:15:29
Z tilman $
#
# Copyright (c) 2005 Tilman Sauerbeck (tilman at code-monkey de)
#
#
# Copyright (c) 2005 Tilman Sauerbeck (tilman at code-monkey de)
#
@@
-58,12
+58,10
@@
module Redact
end
def clip=(part)
end
def clip=(part)
- if
self == part
+ if
part == self
raise(ArgumentError, "cannot clip part to itself")
raise(ArgumentError, "cannot clip part to itself")
- elsif part.nil?
- @clip = nil
- elsif part.collection != @collection
- raise(ArgumentError, "parts' collections not identical")
+ elsif !part.nil? && part.collection != @collection
+ raise(ArgumentError, "items not in the same collection")
else
@clip = part
end
else
@clip = part
end
@@
-178,10
+176,10
@@
module Redact
end
def confine=(part)
end
def confine=(part)
- if part ==
self
+ if part ==
@part
raise(ArgumentError, "cannot confine part to itself")
elsif !part.nil? && part.collection != @part.collection
raise(ArgumentError, "cannot confine part to itself")
elsif !part.nil? && part.collection != @part.collection
- raise(ArgumentError, "
parts' collections not identical
")
+ raise(ArgumentError, "
items not in the same collection
")
else
@confine = part
end
else
@confine = part
end