lib/sequel/extensions/pg_range_ops.rb in sequel-3.47.0 vs lib/sequel/extensions/pg_range_ops.rb in sequel-3.48.0
- old
+ new
@@ -77,11 +77,17 @@
class_eval("def #{f}; function(:#{f}) end", __FILE__, __LINE__)
end
OPERATORS.keys.each do |f|
class_eval("def #{f}(v); operator(:#{f}, v) end", __FILE__, __LINE__)
end
- alias starts_before ends_before
- alias ends_after starts_after
+ def starts_before(v)
+ Sequel::Deprecation.deprecate('Postgres::PGRangeOp#starts_before', "Please switch to Postgres::PGRangeOp#ends_before")
+ ends_before(v)
+ end
+ def ends_after(v)
+ Sequel::Deprecation.deprecate('Postgres::PGRangeOp#ends_after', "Please switch to Postgres::PGRangeOp#starts_after")
+ starts_after(v)
+ end
# These operators are already supported by the wrapper, but for ranges they
# return ranges, so wrap the results in another RangeOp.
%w'+ * -'.each do |f|
class_eval("def #{f}(v); RangeOp.new(super) end", __FILE__, __LINE__)