Skip to content

Instantly share code, notes, and snippets.

@ernie
Created August 6, 2010 16:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ernie/511577 to your computer and use it in GitHub Desktop.
Save ernie/511577 to your computer and use it in GitHub Desktop.
ruby-1.9.2-head > a = Arel::Predicates::Inequality.new(1,1)
=> #<Arel::Predicates::Inequality:0x00000101a0b480 @operand=1, @operand2=1>
ruby-1.9.2-head > a.is_a?(Arel::Predicates::Equality)
=> true
ruby-1.9.2-head > Arel::Predicates::Equality === a
=> true
ruby-1.9.2-head > [a].grep(Arel::Predicates::Equality)
=> [#<Arel::Predicates::Inequality:0x00000101a0b480 @operand=1, @operand2=1>]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment