зеркало из https://github.com/github/ruby.git
[ruby/prism] switch unless to if
https://github.com/ruby/prism/commit/29bdbf4212 Co-authored-by: Kevin Newton <kddnewton@gmail.com>
This commit is contained in:
Родитель
cfabe9c51c
Коммит
ac4046d34b
|
@ -118,7 +118,7 @@ module Prism
|
||||||
current = current.parent
|
current = current.parent
|
||||||
end
|
end
|
||||||
|
|
||||||
unless current.is_a?(ConstantReadNode) || current == nil
|
if !current.is_a?(ConstantReadNode) && !current.nil?
|
||||||
raise DynamicPartsInConstantPathError, "Constant path contains dynamic parts. Cannot compute full name"
|
raise DynamicPartsInConstantPathError, "Constant path contains dynamic parts. Cannot compute full name"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче