Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mspec updates through 202411051711 #70

Merged
merged 5 commits into from
Nov 5, 2024
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
7 changes: 5 additions & 2 deletions lib/mspec/helpers/numeric.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'mspec/guards/platform'

def nan_value
Expand All @@ -15,11 +16,13 @@ def bignum_value(plus = 0)
end

def max_long
2**(0.size * 8 - 1) - 1
long_byte_size = [0].pack('l!').size
headius marked this conversation as resolved.
Show resolved Hide resolved
2**(long_byte_size * 8 - 1) - 1
end

def min_long
-(2**(0.size * 8 - 1))
long_byte_size = [0].pack('l!').size
-(2**(long_byte_size * 8 - 1))
end

# This is a bit hairy, but we need to be able to write specs that cover the
Expand Down