Reputation: 27
Eclipse 4.3.2
For ruby code, auto-complete doesn't show all the options. The pop window shows up for "f." does not have "read". Hover the mouse on top of "f.read" shows "(builtins) Dir::read()"
def print_all(f)
puts f.read
end
Upvotes: 1
Views: 1131
Reputation: 29990
Ruby auto-complete always misses methods in any IDE due to Ruby's dynamic nature, which does not allow the IDE to guess which methods are available at runtime.
When using dynamic languages such as Ruby, Python or Javascript you should take the auto-complete suggestions as suggestions, and not as statements about what is available.
Though, some text-editors and IDES are better at this than others... In emacs you might use Rsense and hippie expand to get a very rough auto-complete, in eclipse, you get something slightly better, and I have also heard that Ruby mine is better than eclipse at this.
Upvotes: 2