How do i make IO.write appear in auto complete list?

When I type IO.read in an empty .rb file, the auto complete list shows the IO.read method.
But when I type IO.write, it doesn't show anything.
So, can I make IO.write appear in the list somehow?

3 comments
Comment actions Permalink

Hi,

Are you sure that IO.write (i.e class method 'write' of IO class) is defined on run-time? Looks like not, see screenshot.
Screen Shot 2011-08-31 at 12.05.07.png

0
Comment actions Permalink

Oops, sorry.
I totally forgot that IO.write was an instance method and only available to instances..

I checkd again, and found that typing:

fd=IO.sysopen("test.txt")
file=IO.new(fd)
file.write

shows the write method.

but still,

fd=IO.sysopen("test.txt")
file=IO.open(fd)
file.write

doesn't.

0
Comment actions Permalink

Thanks, it is regression particullary in this case RubyMine should be able to infore IO.new.open return type from code annotations in io.rb. I've filed an issue - http://youtrack.jetbrains.net/issue/RUBY-9286

0

Please sign in to leave a comment.