# Strange argument error in Ruby 1.8.4 (2006-02-24)

**URL:** <https://www.ruby-forum.com/t/strange-argument-error-in-ruby-1-8-4-2006-02-24/54623>\
**Category:** Ruby\
**Created:** [March 10, 2006, 10:39am UTC](https://www.ruby-forum.com/t/strange-argument-error-in-ruby-1-8-4-2006-02-24/54623 "2006-03-10T10:39:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ertai](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/258eb7/32.png) [@ertai](https://www.ruby-forum.com/u/ertai)\
**Post date:** [March 10, 2006, 10:39am UTC](https://www.ruby-forum.com/t/strange-argument-error-in-ruby-1-8-4-2006-02-24/54623/1 "2006-03-10T10:39:04Z")

</div>

Hi there,

I found a strange difference somewhere between Ruby 1.8.4 (2005-12-24)  
and Ruby 1.8.4 (2006-02-24).

Here the code:

h = {}  
a = []  
h[‘test’] ||= a.join ‘c’

ArgumentError: wrong number of arguments (2 for 1)  
from (irb):5:in `[]’  
from (irb):5

To fix it, I add parenthesis like that:

h[‘test’] ||= a.join(‘c’)

But I found it strange enough to ask the question.

Regards,
