Skip to content

ri completion throws warning under ruby 2.6.3 #343

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
graywolf opened this issue Aug 27, 2019 · 2 comments
Closed

ri completion throws warning under ruby 2.6.3 #343

graywolf opened this issue Aug 27, 2019 · 2 comments

Comments

@graywolf
Copy link
Contributor

graywolf commented Aug 27, 2019

When I write in terminal

ri mktmpd<TAB>

the output is as follows

$ ri mktmpd-e:1: warning: flip-flop is deprecated
Nothing known about RSS::Maker::RSS09::Channel
Did you mean?  RSS::Maker::RSS09::Channel
               RSS::Maker::RSS092::Channel
               RSS::Maker::RSS091::Channel
               RSS::Maker::RSS20::Channel
               RSS::Maker::RSS10::Channel
               RSS::Maker::RSS09::Channel::Title
               RSS::Maker::RSS09::Channel::Links
               RSS::Maker::RSS09::Channel::Cloud
               RSS::Maker::RSS09::Image
               RSS::Maker::RSS092::Image
               RSS::Maker::RSS091::Image
               RSS::Maker::RSS20::Image
               RSS::Maker::RSS10::Image
               RSS::Maker::RSS09::Items
ir ^C

Ruby version string

$ ruby --version
ruby 2.6.3p62 (2019-04-16 revision 67580) [x86_64-linux]

Environment is up-to-date archlinux.

@graywolf
Copy link
Contributor Author

The Nothing known about... can be fixed by

+   $ git diff
diff --git a/ri b/ri
index 8f33141..275dfa6 100644
--- a/ri
+++ b/ri
@@ -23,7 +23,7 @@ _ri_get_methods()
         # older versions of ri didn't distinguish between class/module and
         # instance methods
         COMPREPLY+=( \
-            "$(ruby -W0 $ri_path "${classes[@]}" | ruby -ane \
+            "$(ruby -W0 $ri_path "${classes[@]}" 2> /dev/null | ruby -ane \
             'if /^-/.../^-/ and ! /^-/ and ! /^ +(class|module): / then \
             print $_.split(/, |,$| +/).grep(/^[^\[]*$/).join("\n"); \
             end' | sort -u)" )

but not sure how clean that is :/

@graywolf-at-work
Copy link

Ruby 2.6.4 should fix the warning ( ruby/ruby@aae25dd ), that leaves the Nothing known about... part.

@scop scop closed this as completed in f5d99f2 Sep 5, 2019
algorythmic pushed a commit to algorythmic/bash-completion that referenced this issue Oct 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants