defunkt / tomdoc

A TomDoc Ruby library.
http://tomdoc.org/
MIT License
114 stars 16 forks source link

Don't blow up horribly with ruby 1.9 #24

Closed foca closed 12 years ago

foca commented 12 years ago

O HAI

Now that there's a (prerelease) version of RubyParser that supports 1.9, can we get a prerelease of tomdoc 0.2.6 or something that includes this? :D

trans commented 12 years ago

Does this make it 1.9 only? Or will it still work okay with 1.8?

foca commented 12 years ago

Hrm, good point :) I'll fix that commit to switch which RubyParser to use depending on RUBY_VERSION. Does that make sense?

foca commented 12 years ago

Er, just realized that's not the best idea, since RUBY_VERSION signals the runner's version, not the parsed file's :) Anyhow, there's only a couple small things from 1.8 that would fail with Ruby19Parser, but I'll see how to fix that. I'll reopen this request when I have time to figure out the correct fix :)

trans commented 12 years ago

Well we are probably better off going 1.9 at this point anyway, so I accept patch while you see if you can think of a solution for still supporting 1.8. We can always use a command line option if need be.