From: Roger Pack Date: 2009-01-29T05:11:16+09:00 Subject: [ruby-core:21646] Re: [Feature #1046] request: ability to run without specifying .rb > |Oh sorry--I meant that you would probably find my answer [that I am lazy and > |don't want to have to think when running ruby] as unsatisfying. > > That's the point. I have been a Ruby user for last 15 years, and I > have never felt omitting extension help me being lazy. I am sure I am > lazier than you are here. In fact, I am too lazy to think about .rb > as a extension, it's only a part of file name unless it a library name > (target of require). So there must be something help you by omitting > extension. Could you explain how this help you to be lazy, unless you > are too lazy? > > Tab issue is reasonable, but not strong enough, if I have "foo.rb", > when I type "fo" then hit tab, I will get "foo.rb" anyway. It's > highly dependent on how you choose file names. good answer :) I like the suggestion to create a batch file [say r.bat] that handles both cases that should work well. Another question: Is there a way to do this from the command line? require 2 files: $ ruby -rrubygems -rfacets -e '3' ruby: no such file to load -- facets (LoadError) Also is there a way to do something like $ ruby -e 'initialization code' filename_run_after.rb I am just wondering. Thanks. -=r