Skip to content

Conversation

@dearblue
Copy link
Contributor

Previously, the following code did not give the expected result.

% bin/mruby -e 'p "%08X" % ~(-1 << 16)'
"..F0000FFFF"

% ruby32 -e 'p "%08X" % ~(-1 << 24)'
"00FFFFFF"

For information: this problem arises in the process of folding numbers through optimisation.

Previously, the following code did not give the expected result.

```
% bin/mruby -e 'p "%08X" % ~(-1 << 16)'
"..F0000FFFF"

% ruby32 -e 'p "%08X" % ~(-1 << 24)'
"00FFFFFF"
```

For information: this problem arises in the process of folding numbers through optimisation.
@dearblue dearblue requested a review from matz as a code owner April 15, 2023 12:11
@matz matz merged commit a959ce5 into mruby:master Apr 15, 2023
@dearblue dearblue deleted the sign-extension branch May 6, 2023 12:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants