Skip to content

Commit 91d8970

Browse files
committed
Fix Metrics/AbcSize
1 parent d1cbc3a commit 91d8970

File tree

3 files changed

+8
-12
lines changed

3 files changed

+8
-12
lines changed

.rubocop_todo.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@ Lint/Eval:
1111
Exclude:
1212
- 'lib/symengine.rb'
1313

14-
# Offense count: 1
15-
Metrics/AbcSize:
16-
Max: 20
17-
1814
# Offense count: 28
1915
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes.
2016
# URISchemes: http, https

lib/symengine.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ def evalf(operand, prec = 53, real = false)
4141
def lambdify(exp, *syms)
4242
syms.flatten!
4343
if exp.free_symbols.count > syms.length
44-
raise ArgumentError, "Formula contains #{exp.free_symbols.count} free "\
44+
raise ArgumentError, 'Formula contains #{exp.free_symbols.count} free '\
4545
'symbols. You should provide at least this number '\
46-
"of arguments (only #{syms.length} given)."
46+
'of arguments (only #{syms.length} given).'
4747
end
4848
eval(SymEngine::Utils.lambdify_code(exp, syms))
4949
end

lib/symengine/basic.rb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,17 @@ def to_proc(*args)
1919
if free_symbols.count > 1
2020
raise ArgumentError, 'You should provide symbols order for #to_proc'\
2121
'. Only formulae with 1 free symbol can deduce'\
22-
" its name automatically (#{free_symbols.count}"\
23-
" found in #{self})."
22+
' its name automatically (#{free_symbols.count}'\
23+
' found in #{self}).'
2424
end
25-
SymEngine.lambdify(self, free_symbols.map { |s| s })
25+
return SymEngine.lambdify(self, free_symbols.map { |s| s })
2626
else
2727
if free_symbols.count > args.length
28-
raise ArgumentError, "Formula contains #{free_symbols.count} free "\
28+
raise ArgumentError, 'Formula contains #{free_symbols.count} free '\
2929
'symbols. You should provide at least this number '\
30-
"of arguments (only #{args.length} given)."
30+
'of arguments (only #{args.length} given).'
3131
end
32-
SymEngine.lambdify(self, args)
32+
return SymEngine.lambdify(self, args)
3333
end
3434
end
3535
end

0 commit comments

Comments
 (0)