Created
December 6, 2021 14:10
-
-
Save shibukk/7ada4f07dddec33b879d0a283b9a7528 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
str = "Hello, world!" | |
=> "Hello, world!" | |
# object_idを確認してみる | |
str.object_id | |
=> 240 | |
# 左にビットシフトしてもオブジェクトの実際のポインタ値を確認できない | |
str.object_id.<<(1).to_s(16) | |
=> "1e0" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment