Skip to content

Commit

Permalink
Merge pull request datamapper#150 from d11wtq/bugfix/direction-operat…
Browse files Browse the repository at this point in the history
…or-precedence

Change Direction/Operator precedence (fixes regression at d4377a9)
  • Loading branch information
emmanuel committed Oct 9, 2011
2 parents a5ce6f2 + e4668d1 commit 03f14bc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/dm-core/query.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1053,6 +1053,9 @@ def normalize_order
@order = Array(@order)
@order = @order.map do |order|
case order
when Direction
order.dup

when Operator
target = order.target
property = target.kind_of?(Property) ? target : @properties[target]
Expand All @@ -1065,9 +1068,6 @@ def normalize_order
when Property
Direction.new(order)

when Direction
order.dup

when Path
Direction.new(order.property)

Expand Down

0 comments on commit 03f14bc

Please sign in to comment.