Skip to content
This repository

Array#pack should not test (or relax the expected value for) packing a NaN value #110

Closed
BanzaiMan opened this Issue · 0 comments

1 participant

Hiro Asari
Hiro Asari
Collaborator

As discussed on https://bugs.ruby-lang.org/issues/5884, the value returned by [0.0/0.0].pack("g") and the like is indeterminate. We should either get rid of the existing specs, or relax the expected values so that either of the two possible NaN's (as defined in IEEE 754) can be returned.

MRI tests check only that Array#pack and String#unpack make a correct round trip.

Brian Shirai brixen closed this in 7660bcf
Steven Yang yangchenyun referenced this issue from a commit in yangchenyun/rubyspec
Steven Yang yangchenyun Merge branch 'up'
* up: (167 commits)
  $SAFE=4 is obsolete in Ruby 2.1.
  Fix ruby_bug guard
  Correct testcase description.
  Added test for bug #8485 (MRI 1.9.3-2.0)
  Add specs for BigDecimal `/` with Float and Rational divisors.
  fix a2b9dc1; add before :each
  2.1 supports StringScanner#[name]
  Add spec for bug #8436.
  Check round-trip for NaN under #unpack.
  Check round-trip for NaN under #pack. Closes #110.
  Added IRC notification for builds.
  Cleaned up Enumerable#chunk specs.
  Fixed Array#shuffle specs using RNG.
  Update underscore specs in dash_s_spec
  Specs for Time#to_date (Ruby 1.9)
  Add tests for repeated slicing.
  Moving encode option spec to shared example, because both IO.write and IO.binwrite must support this option.
  defined?(super) in blocks should return "super"
  Add specs for BEGIN/END behaviour with -n
  Spec for -F option
  ...
60bb1cf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.