--002215048f63d2ec87048b35dc82
Content-Type: text/plain; charset=UTF-8

Maybe the loop and gsub are causing the confusion. If all you want to do is
replace the value associated with the key, you can simple assign it:

 some_hash['Name']  New Name"

Is that what you are trying to do?


On Mon, Jul 12, 2010 at 10:27 PM, Abder-rahman Ali <
abder.rahman.ali / gmail.com> wrote:

> I think my MAIN point is this.
>
>  key.gsub!(toreplace, inplace)
>
> key ---> It is what I insert.
>
> Say key  ame
>
> Now, for the "toreplace" and "inplace" parts, shouldn't I enter values
> for them for the substition to work?
>
> For example:
>
> key.gsub!('Name', 'ID')
>
> Shouldn't this replace 'Name' with 'ID'.
>
> But, in the example I saw in the book and the other that I mimicked, I
> find only the variable names but no values.
>
> What should I do to complement the examples?
>
> Thanks.
> --
> Posted via http://www.ruby-forum.com/.
>
>

--002215048f63d2ec87048b35dc82--