Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: [PATCH] Completion/Unix/Commands/_ri: updated for Ruby 1.9.2



On Thu, 6 Jan 2011, Alexey I. Froloff wrote:

On Wed, Jan 05, 2011 at 04:27:35PM -0500, Benjamin R. Haskell wrote:
Maybe it makes sense, but it seems weird that the tests are conditioned on running Ruby scripts rather than looking at `ri --version`.
ri --version reports something weird. I don't know since when things were changed, checking for modules that have been removed or added seems to be fair enough.

Are you thinking there's too much (and too direct) ruby invocations?

Yes, that was the concern. I guess it's not really that much. The repetitive portion that keeps the arguments that the user has already passed:

${(kv)opt_args[(I)-d|--doc-dir|...etc...]}

made me think at first glance that there was more coding than there actually is.


And how does this fare against different Ruby implementations? Would JRuby 1.9.2 necessarily use the same 'ri' conventions as MRI Ruby 1.9.2?
Yes. Latest JRuby supports both 1.8 and 1.9 Ruby versions and have copies of standard runtime libraries (both versions) which includes RI.

Okay. (Didn't know whether Ruby implementations had different arguments [ala C++ compilers].)


And more generally, since it's looking in directories that would only contain Ruby documentation, would it hurt to include both .yaml and .ri for versions that support .ri?
I thought about it, yes. Newer RI doesn't read .yaml documentation. It wouldn't hurt, but it would complete something that can't be shown.

Saynomore. I was in the process of trying to install 1.9.2 alongside 1.8.7 on my Gentoo machine, so I couldn't check as much: if the newer version can't read it, it makes sense to not show it.


This patch will un-break ri completion for latest stable MRI Ruby version. I wrote this completion and I am responsible for that.

Was still broken for me until I added the patch that I just sent.


However, I am not satisfied with current implementation, I'm working on it.

Out of curiosity, what don't you like at this point?

--
Best,
Ben



Messages sorted by: Reverse Date, Date, Thread, Author