rubysl/rubysl-pathname — pull request #4 by Benny1992 (2014-09-23 15:46:37+00:00)
Title: Different behaviour between mri and rbx

Consider following example:

```ruby
require 'pathname'

class RootPath
def to_str
'/'
end
end

p Pathname.new(RootPath.new)
```

On mri:
```bash
λ bennyklotz ruby → ruby pathname.rb
#
```

On rbx:
```bash
λ bennyklotz ruby → ruby pathname.rb
#>
```

This is because in https://github.com/rubysl/rubysl-pathname/blob/2.0/lib/rubysl/pathname/pathname.rb#L196-L201 is checked if the ruby version is lesser than 1.9 or not.

Therefore the version is 2.1.0 for rbx 2.2.10 it's using ```:to_path``` as ```TO_PATH``` method
We should implement a fallback even for RUBY_VERSION greater than 1.9 because in MRI it's still working if you are defining ```to_str``` on a class.

Correct me If I got anything wrong.