irb(main):001:0> s = "string"=> "string"irb(main):006:0> s[ 'hi' ] = 'foo'IndexError: string not matched from (irb):6:in
Here you already declared 's' as string then you can't use it as hash.
No comments:
Post a Comment