summaryrefslogtreecommitdiff
path: root/test/ruby/test_stack.rb
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2025-01-29 17:51:21 +0900
committergit <svn-admin@ruby-lang.org>2025-02-13 17:49:48 +0000
commit2b92172894e755362a7a0b74ef3b6a5543a89017 (patch)
tree72863f2de258057c65f502dee898c6fcfcd624da /test/ruby/test_stack.rb
parent9826047f01230780c0e64072fa03a7a4aecba63c (diff)
[ruby/prism] Split assertion per expressions
Expressions joined with `&&` are better asserted separately, so that it is clear from the failure message which expression is false. Also, `unsigned long` may not be enough for `ptrdiff_t`, e.g., Windows. Saying that `ptrdiff_t` can be larger than `SIZE_MAX` means that `PTRDIFF_MAX` is larger than `SIZE_MAX` and `ptrdiff_t` is sufficient to represent `SIZE_MAX`, otherwise if `PTRDIFF_MAX` is smaller than `SIZE_MAX`, `diff` will always be smaller than `SIZE_MAX` as well. `diff` could be equal to `SIZE_MAX` only if `PTRDIFF_MAX` is equal to `SIZE_MAX` and these assertions would pass, but I don't think there is any platform where that is the case. https://github.com/ruby/prism/commit/1fc6dfcada
Diffstat (limited to 'test/ruby/test_stack.rb')
0 files changed, 0 insertions, 0 deletions