diff options
| author | keiju <keiju@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-08-29 10:00:27 +0000 |
|---|---|---|
| committer | keiju <keiju@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-08-29 10:00:27 +0000 |
| commit | 7af42a25b81a8adbf54fefccbd4d02ed96ba859b (patch) | |
| tree | b83bf0f2bbd02f6b9fefc8d588bda1644ac56bfb /lib/irb | |
| parent | 6bad842a69bef07e84756f603187fe5af452b643 (diff) | |
| download | ruby-7af42a25b81a8adbf54fefccbd4d02ed96ba859b.tar.gz ruby-7af42a25b81a8adbf54fefccbd4d02ed96ba859b.tar.xz ruby-7af42a25b81a8adbf54fefccbd4d02ed96ba859b.zip | |
* lib/irb/init.rb: make IRB -I option that is same befavior for ruby.
[ruby-dev:26872]
* lib/irb/locale.rb: support to print help message when OS locale is
ja_JP.utf-8. [ruby-dev:26872]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@9040 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/irb')
| -rw-r--r-- | lib/irb/init.rb | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/lib/irb/init.rb b/lib/irb/init.rb index 00b7f1bd6..c53d5adf3 100644 --- a/lib/irb/init.rb +++ b/lib/irb/init.rb @@ -121,8 +121,7 @@ module IRB @CONF[:LC_MESSAGES].load("irb/error.rb") end - FEATUER_IOPT_CHANGE_VERSION = "1.9.0" - FEATUER_IOPT_CHANGE_DATE = "2005-04-22" + FEATURE_IOPT_CHANGE_VERSION = "1.9.0" # option analyzing def IRB.parse_opts @@ -140,7 +139,7 @@ module IRB @CONF[:LOAD_MODULES].push opt if opt when /^-I(.+)?/ opt = $1 || ARGV.shift - load_path.push opt if opt + load_path.concat(opt.split(File::PATH_SEPARATOR)) if opt when /^-K(.)/ $KCODE = $1 when "--inspect" @@ -193,10 +192,10 @@ module IRB break end end - if RUBY_VERSION > FEATUER_IOPT_CHANGE_VERSION || - RUBY_VERSION == FEATUER_IOPT_CHANGE_VERSION && - RUBY_RELEASE_DATE >= FEATUER_IOPT_CHANGE_DATE - load_path = load_path.collect{|p| File.expand_path(p)} + if RUBY_VERSION >= FEATURE_IOPT_CHANGE_VERSION + load_path.collect do |path| + /\A\.\// =~ path ? path : File.expand_path(path) + end end $LOAD_PATH.unshift(*load_path) end |
