Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Ruby の String#hex が、指定された char に対して正しい 16 進値を返さないのは奇妙だと思いました。メソッドを誤解しているかもしれませんが、次の例を見てください。
'a'.hex => 10
一方、「a」の正しい 16 進値は 61 になります。
'a'.unpack('H*') => 61
何か不足していますか?ヘックスは何のためですか?ヒントをいただければ幸いです。
ありがとう