On Mar 4, 1:28 pm, Clive Crous <[email protected]> wrote:
> I have a very very simple piece of code within a migration that I just
> can't get to work. I've stripped it even further for the sake of
> clarity in this example. Perhaps I've been staring at the code for too
> long but it seems to me that this really shouldn't fail. I'm 99%
> certain that this kind of thing worked before when using the following
> (perhaps it's failing because I'm now on Ruby 1.9?) =>
>
> ...
> def up
> ...
> self[ :incoming_messages ].filter( ~{ :processed_at => nil }
> ).all.each do |message|
> p self[ :outgoing_messages ].filter( :queued_at <= message[
> :processed_at ] ).sql # this is line 13 in error as shown below
> end
> ...
On Ruby 1.9, you need to use a virtual row block:
filter{queued_at <= message[:processed_at]}
This is because ruby 1.9 defines Symbol#<= (by including Comparable),
and Sequel does not override methods defined by ruby.
Jeremy
--
You received this message because you are subscribed to the Google Groups
"sequel-talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sequel-talk?hl=en.