Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unused operand1/operand2 aliases #39023

Merged
merged 1 commit into from Apr 24, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 0 additions & 2 deletions activerecord/lib/arel/nodes/equality.rb
Expand Up @@ -4,8 +4,6 @@ module Arel # :nodoc: all
module Nodes
class Equality < Arel::Nodes::Binary
def operator; :== end
alias :operand1 :left
alias :operand2 :right

def invert
Arel::Nodes::NotEqual.new(left, right)
Expand Down
16 changes: 0 additions & 16 deletions activerecord/test/cases/arel/nodes/equality_test.rb
Expand Up @@ -15,22 +15,6 @@ module Nodes
end
end

describe "operand1" do
it "should equal left" do
attr = Table.new(:users)[:id]
left = attr.eq(10)
_(left.left).must_equal left.operand1
end
end

describe "operand2" do
it "should equal right" do
attr = Table.new(:users)[:id]
left = attr.eq(10)
_(left.right).must_equal left.operand2
end
end

describe "to_sql" do
it "takes an engine" do
engine = FakeRecord::Base.new
Expand Down