aboutsummaryrefslogtreecommitdiffstats
path: root/actioncable
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2016-09-01 23:41:49 +0200
committerXavier Noria <fxn@hashref.com>2016-09-01 23:41:49 +0200
commitbb1ecdcc677bf6e68e0252505509c089619b5b90 (patch)
tree99dd8fd164e1c582216a4b08c3d066049217bb7f /actioncable
parent8c402ef425771c3dbb4659dd946714e69fdf5ce9 (diff)
downloadrails-bb1ecdcc677bf6e68e0252505509c089619b5b90.tar.gz
rails-bb1ecdcc677bf6e68e0252505509c089619b5b90.tar.bz2
rails-bb1ecdcc677bf6e68e0252505509c089619b5b90.zip
fixes remaining RuboCop issues [Vipul A M, Xavier Noria]
Diffstat (limited to 'actioncable')
-rw-r--r--actioncable/Rakefile2
-rw-r--r--actioncable/lib/action_cable/connection/client_socket.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/actioncable/Rakefile b/actioncable/Rakefile
index 34649547a2..648de57004 100644
--- a/actioncable/Rakefile
+++ b/actioncable/Rakefile
@@ -21,7 +21,7 @@ namespace :test do
task :isolated do
Dir.glob("test/**/*_test.rb").all? do |file|
sh(Gem.ruby, "-w", "-Ilib:test", file)
- end or raise "Failures"
+ end || raise("Failures")
end
task :integration do
diff --git a/actioncable/lib/action_cable/connection/client_socket.rb b/actioncable/lib/action_cable/connection/client_socket.rb
index c48f000d9c..70a2bbecb1 100644
--- a/actioncable/lib/action_cable/connection/client_socket.rb
+++ b/actioncable/lib/action_cable/connection/client_socket.rb
@@ -89,7 +89,7 @@ module ActionCable
code ||= 1000
reason ||= ""
- unless code == 1000 or (code >= 3000 and code <= 4999)
+ unless code == 1000 || (code >= 3000 && code <= 4999)
raise ArgumentError, "Failed to execute 'close' on WebSocket: " +
"The code must be either 1000, or between 3000 and 4999. " +
"#{code} is neither."