Skip to content

Commit

Permalink
Remove unnecessary test
Browse files Browse the repository at this point in the history
* Kernel::Array() will handle an Enumerable fine without a special test.
  • Loading branch information
dkubb committed May 26, 2010
1 parent fe6c5c9 commit 5c5cff7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/dm-core/model/relationship.rb
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ def assert_valid_options(options)
# :target_key (will mean something different for each relationship)

[ :child_key, :parent_key ].each do |key|
if options.key?(key) && !options[key].is_a?(Enumerable)
if options.key?(key)
options[key] = Array(options[key])
end
end
Expand Down

0 comments on commit 5c5cff7

Please sign in to comment.