Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →
instance method
Gem::SafeMarshal::Visitors::ToRuby#visit_Gem_SafeMarshal_Elements_Float
visit_Gem_SafeMarshal_Elements_Float(f)
lib/rubygems/safe_marshal/visitors/to_ruby.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.1.0-preview1/lib/rubygems/safe_marshal/visitors/to_ruby.rb, line 233
def visit_Gem_SafeMarshal_Elements_Float(f)
register_object(
case f.string
when "inf"
::Float::INFINITY
when "-inf"
-::Float::INFINITY
when "nan"
::Float::NAN
else
f.string.to_f
end
)
end
No documentation available