rubinius/rubinius — Issue #1504: NameError raised in Array#join when it expects NoMethodError in 1.9 mode
Author: dkubb
Created: 2012-01-10 06:55:52+00:00
State: open

@brixen asked me to report a problem that I'm experiencing with `Array#join` in 1.9 mode.

I don't yet have a test case reduction, but I do have a repo where this can be reproduced from. The steps to install are:

```bash
git clone git://github.com/dkubb/veritas.git
rm veritas/.rvmrc
cd veritas
RBXOPT="-Xint -X19" bundle --without guard benchmarks
RBXOPT="-Xint -X19" bundle exec rake spec
```

Here's a sample of what I'm seeing: https://gist.github.com/1587366#file_1_error.txt

It appears that `Array#join` is calling `#to_str` on every argument, which is causing a `NameError` exception to be raised rather than the expected `NoMethodError` exception. This only seems to happen within the context of the spec suite, stand-along code like `Class.to_str` will raise `NoMethodError` as expected.