Permit ri completion to work with later versions.

This commit is contained in:
ianmacd 2006-02-25 13:25:59 +00:00
parent 086cd1e748
commit f6acf2d134

View File

@ -1,6 +1,6 @@
# ri completion for Ruby documentation by Ian Macdonald <ian@caliban.org> # ri completion for Ruby documentation by Ian Macdonald <ian@caliban.org>
# #
# $Id: ri,v 1.7 2004/01/04 12:38:09 ianmacd Exp $ # $Id: ri,v 1.8 2006/02/25 14:25:59 ianmacd Exp $
# #
ri_get_methods() ri_get_methods()
{ {
@ -46,6 +46,7 @@ _ri()
# -W0 is required here to stop warnings from older versions of ri # -W0 is required here to stop warnings from older versions of ri
# from being captured when used with Ruby 1.8.1 and later # from being captured when used with Ruby 1.8.1 and later
ri_version="$(ruby -W0 $ri_path -v 2>&1)" || ri_version=integrated ri_version="$(ruby -W0 $ri_path -v 2>&1)" || ri_version=integrated
[ "$ri_version" != "${ri_version%200*}" ] && ri_version=integrated
# need to also split on commas # need to also split on commas
IFS=$', \n\t' IFS=$', \n\t'