aboutsummaryrefslogtreecommitdiffstats
path: root/lib/irb/init.rb
diff options
context:
space:
mode:
authorkeiju <keiju@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-12-25 12:16:10 +0000
committerkeiju <keiju@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-12-25 12:16:10 +0000
commit0f63b60f23aea76e52a6f6fc0d073eb2defe58d8 (patch)
tree7895a7e39e56881bfc42fef9c7e927575fe33764 /lib/irb/init.rb
parent6dab48b20eaafe8482d2f34096c5f28779115ca9 (diff)
downloadruby-0f63b60f23aea76e52a6f6fc0d073eb2defe58d8.tar.gz
* lib/irb/init.rb, lib/irb/lc/ja/error.rb, lib/irb/lc/error.rb:
raise exception when illegal RC_NAME_GENARATOR defined [Bug #6455]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38600 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/irb/init.rb')
-rw-r--r--lib/irb/init.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/irb/init.rb b/lib/irb/init.rb
index 35fa752c2b..159066bbce 100644
--- a/lib/irb/init.rb
+++ b/lib/irb/init.rb
@@ -256,7 +256,12 @@ module IRB # :nodoc:
end
end
end
- @CONF[:RC_NAME_GENERATOR].call ext
+ case rc_file = @CONF[:RC_NAME_GENERATOR].call(ext)
+ when String
+ return rc_file
+ else
+ IRB.fail IllegalRCNameGenerator
+ end
end
# enumerate possible rc-file base name generators