Changes

Jump to: navigation, search

Understanding Ruby Variables

5 bytes added, 21:12, 30 November 2007
Changing Variable Type
== Changing Variable Type ==
One of simplest ways to change the type of a variable is to simply assign a new value to it. Ruby is will dynamically change the type for that variable to match the type of the new value assigned. For example, we can create a variable containing an integer and verify the type:
<pre>
</pre>
As we can see, the x variable is now a string.
== Converting Variable Values ==

Navigation menu