Permalink
Browse files

Remove ArgumentError.

It is untested. There is no `@frame` variable. Presumably it is supposed
to be `@framing`, but changing that shows that some of the tests *are*
setting frame twice.

I don't see why this level of strictness is necessary. If someone
disagrees, they should add a test for this behaviour and make the other
tests pass.
  • Loading branch information...
1 parent cbff1bc commit b5432046134e8c8aa8cafa5960b387b4befff889 @jonleighton jonleighton committed Jul 13, 2012
Showing with 1 addition and 2 deletions.
  1. +1 −2 lib/arel/nodes/window.rb
View
3 lib/arel/nodes/window.rb
@@ -17,7 +17,6 @@ def order *expr
end
def frame(expr)
- raise ArgumentError, "Window frame cannot be set more than once" if @frame
@framing = expr
end
@@ -75,4 +74,4 @@ def initialize(expr = nil)
end
end
end
-end
+end

2 comments on commit b543204

@jonleighton
Ruby on Rails member

@alexstaubo please check this commit ^^

@atombender

Seems like a logical change for now. The reason you must be able to assign @framing is that you can call rows alone, or a subexpression of frame. I'd like to work on the API to make it more stateless.

(Sorry about the late reply, didn't see this until now.)

Please sign in to comment.