summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRobert Speicher <robert@gitlab.com>2017-02-22 00:03:29 +0000
committerRobert Speicher <robert@gitlab.com>2017-02-22 00:03:29 +0000
commit4f6e067eca744b74e5f4b03ce23411976dbc7cce (patch)
tree62b19572dc7c60d1c5648ce452e499bf4e37f7ce /lib
parent7c617fccb4615b9aff35cc7d09aea809381165ee (diff)
parentf40716f48a25809d197ba2abf32ce150b7b73efa (diff)
downloadgitlab-ce-4f6e067eca744b74e5f4b03ce23411976dbc7cce.tar.gz
Merge branch 'dm-no-more-andor' into 'master'
No more and/or See merge request !9428
Diffstat (limited to 'lib')
-rw-r--r--lib/api/helpers.rb2
-rw-r--r--lib/banzai/filter/plantuml_filter.rb2
-rw-r--r--lib/ci/ansi2html.rb2
-rw-r--r--lib/gitlab/metrics/system.rb2
4 files changed, 4 insertions, 4 deletions
diff --git a/lib/api/helpers.rb b/lib/api/helpers.rb
index 7b6fae866eb..ae62f1f9580 100644
--- a/lib/api/helpers.rb
+++ b/lib/api/helpers.rb
@@ -153,7 +153,7 @@ module API
params_hash = custom_params || params
attrs = {}
keys.each do |key|
- if params_hash[key].present? or (params_hash.has_key?(key) and params_hash[key] == false)
+ if params_hash[key].present? || (params_hash.has_key?(key) && params_hash[key] == false)
attrs[key] = params_hash[key]
end
end
diff --git a/lib/banzai/filter/plantuml_filter.rb b/lib/banzai/filter/plantuml_filter.rb
index e194cf59275..b2537117558 100644
--- a/lib/banzai/filter/plantuml_filter.rb
+++ b/lib/banzai/filter/plantuml_filter.rb
@@ -7,7 +7,7 @@ module Banzai
#
class PlantumlFilter < HTML::Pipeline::Filter
def call
- return doc unless doc.at('pre.plantuml') and settings.plantuml_enabled
+ return doc unless doc.at('pre.plantuml') && settings.plantuml_enabled
plantuml_setup
diff --git a/lib/ci/ansi2html.rb b/lib/ci/ansi2html.rb
index c10d3616f31..158a33f26fe 100644
--- a/lib/ci/ansi2html.rb
+++ b/lib/ci/ansi2html.rb
@@ -126,7 +126,7 @@ module Ci
# We are only interested in color and text style changes - triggered by
# sequences starting with '\e[' and ending with 'm'. Any other control
# sequence gets stripped (including stuff like "delete last line")
- return unless indicator == '[' and terminator == 'm'
+ return unless indicator == '[' && terminator == 'm'
close_open_tags()
diff --git a/lib/gitlab/metrics/system.rb b/lib/gitlab/metrics/system.rb
index 287b7a83547..3aaebb3e9c3 100644
--- a/lib/gitlab/metrics/system.rb
+++ b/lib/gitlab/metrics/system.rb
@@ -11,7 +11,7 @@ module Gitlab
mem = 0
match = File.read('/proc/self/status').match(/VmRSS:\s+(\d+)/)
- if match and match[1]
+ if match && match[1]
mem = match[1].to_f * 1024
end