Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions core/kernel/Float_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,10 @@ def to_f() 1.2 end
@object.send(:Float, "0x_10", exception: false).should be_nil
end

it "parses negative hexadecimal string as negative floats" do
Comment thread
kaisecheng marked this conversation as resolved.
Outdated
@object.send(:Float, "-0x7b").should == -123.0
end

ruby_version_is "3.4" do
it "accepts a fractional part" do
@object.send(:Float, "0x0.8").should == 0.5
Expand Down