mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
[Fix] Support when nil is assigned to variable name
(#9105)
* Add `!name.nil?` to if condition
This commit is contained in:
parent
ad54fbf281
commit
d4b1f56f50
1 changed files with 1 additions and 1 deletions
|
@ -338,7 +338,7 @@ module RubyVM::RJIT
|
|||
|
||||
# Give a name to a dynamic CPointer class to see it on inspect
|
||||
def self.with_class_name(prefix, name, cache: false, &block)
|
||||
return block.call if name.empty?
|
||||
return block.call if !name.nil? && name.empty?
|
||||
|
||||
# Use a cached result only if cache: true
|
||||
class_name = "#{prefix}_#{name}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue