Skip to content

Commit 8f9eec4

Browse files
committed
Lint/AssignmentInCondition
1 parent bb44a01 commit 8f9eec4

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

.rubocop_todo.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,6 @@
55
# Note that changes in the inspected code, or installation of new
66
# versions of RuboCop, may require this file to be generated again.
77

8-
# Offense count: 2
9-
# Configuration parameters: AllowSafeAssignment.
10-
Lint/AssignmentInCondition:
11-
Enabled: false
12-
138
# Offense count: 1
149
Lint/RescueException:
1510
Enabled: false

ext/mysql2/extconf.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def asplode(lib)
5353
abort "-----\nCannot find library dir(s) #{lib}\n-----" unless lib && lib.split(File::PATH_SEPARATOR).any? { |dir| File.directory?(dir) }
5454
warn "-----\nUsing --with-mysql-dir=#{File.dirname inc}\n-----"
5555
rpath_dir = lib
56-
elsif mc = (with_config('mysql-config') || Dir[GLOB].first)
56+
elsif (mc = (with_config('mysql-config') || Dir[GLOB].first))
5757
# If the user has provided a --with-mysql-config argument, we must respect it or fail.
5858
# If the user gave --with-mysql-config with no argument means we should try to find it.
5959
mc = Dir[GLOB].first if mc == true
@@ -170,7 +170,7 @@ def asplode(lib)
170170
warn "-----\nSetting mysql rpath to #{explicit_rpath}\n-----"
171171
$LDFLAGS << rpath_flags
172172
else
173-
if libdir = rpath_dir[%r{(-L)?(/[^ ]+)}, 2]
173+
if (libdir = rpath_dir[%r{(-L)?(/[^ ]+)}, 2])
174174
rpath_flags = " -Wl,-rpath,#{libdir}"
175175
if RbConfig::CONFIG["RPATHFLAG"].to_s.empty? && try_link('int main() {return 0;}', rpath_flags)
176176
# Usually Ruby sets RPATHFLAG the right way for each system, but not on OS X.

0 commit comments

Comments
 (0)