1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Update fixnum.h

Fix a typo: "nevative" => "negative" in `rb_fix_plus_fix`.
This commit is contained in:
jacopo 2020-12-01 12:19:05 +01:00 committed by Hiroshi SHIBATA
parent ad0c2232b1
commit 0c57438ccf
Notes: git 2020-12-01 20:41:00 +09:00

View file

@ -61,7 +61,7 @@ rb_fix_plus_fix(VALUE x, VALUE y)
* (3) Of course `z = x + (y-1)` may overflow. * (3) Of course `z = x + (y-1)` may overflow.
* At that time true value is * At that time true value is
* * positive: 0b0 1xxx...1, and z = 0b1xxx...1 * * positive: 0b0 1xxx...1, and z = 0b1xxx...1
* * nevative: 0b1 0xxx...1, and z = 0b0xxx...1 * * negative: 0b1 0xxx...1, and z = 0b0xxx...1
* To convert this true value to long, * To convert this true value to long,
* (a) Use arithmetic shift * (a) Use arithmetic shift
* * positive: 0b11xxx... * * positive: 0b11xxx...