diff options
-rw-r--r-- | lib/arel/select_manager.rb | 2 | ||||
-rw-r--r-- | lib/arel/table.rb | 2 | ||||
-rw-r--r-- | lib/arel/visitors/to_sql.rb | 2 | ||||
-rw-r--r-- | test/nodes/test_infix_operation.rb | 2 | ||||
-rw-r--r-- | test/visitors/test_to_sql.rb | 2 |
5 files changed, 4 insertions, 6 deletions
diff --git a/lib/arel/select_manager.rb b/lib/arel/select_manager.rb index f1dde6403a..4a652f2c9c 100644 --- a/lib/arel/select_manager.rb +++ b/lib/arel/select_manager.rb @@ -106,7 +106,7 @@ module Arel case relation when String, Nodes::SqlLiteral - raise if relation.blank? + raise if relation.empty? klass = Nodes::StringJoin end diff --git a/lib/arel/table.rb b/lib/arel/table.rb index 545e73e3ae..01d4561ff1 100644 --- a/lib/arel/table.rb +++ b/lib/arel/table.rb @@ -57,7 +57,7 @@ primary_key (#{caller.first}) is deprecated and will be removed in Arel 4.0.0 case relation when String, Nodes::SqlLiteral - raise if relation.blank? + raise if relation.empty? klass = Nodes::StringJoin end diff --git a/lib/arel/visitors/to_sql.rb b/lib/arel/visitors/to_sql.rb index 28c4bd8bfa..a1dee43cab 100644 --- a/lib/arel/visitors/to_sql.rb +++ b/lib/arel/visitors/to_sql.rb @@ -103,9 +103,7 @@ module Arel collector << "UPDATE " collector = visit o.relation, collector - values = false unless o.values.empty? - values = true collector << " SET " collector = inject_join o.values, collector, ", " end diff --git a/test/nodes/test_infix_operation.rb b/test/nodes/test_infix_operation.rb index bec226e395..40616024e5 100644 --- a/test/nodes/test_infix_operation.rb +++ b/test/nodes/test_infix_operation.rb @@ -18,7 +18,7 @@ module Arel assert_equal 'zomg', aliaz.right end - def test_opertaion_ordering + def test_operation_ordering operation = InfixOperation.new :+, 1, 2 ordering = operation.desc assert_kind_of Descending, ordering diff --git a/test/visitors/test_to_sql.rb b/test/visitors/test_to_sql.rb index 65d36bc004..a88c888908 100644 --- a/test/visitors/test_to_sql.rb +++ b/test/visitors/test_to_sql.rb @@ -249,7 +249,7 @@ module Arel it "unsupported input should not raise ArgumentError" do error = assert_raises(RuntimeError) { compile(nil) } - assert_match /\Aunsupported/, error.message + assert_match(/\Aunsupported/, error.message) end it "should visit_Arel_SelectManager, which is a subquery" do |