example code"><code><span style="color:#00D">42</span>.to_hex <span style="color:#777"># =&gt; &quot;2A&quot;</span></code></pre>
    
  </div>

<p class="tag_title">Returns:</p>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt>String</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>The interger converted to hexadecimal and casted to an upper case string</p>
</div>
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      