diff options
Diffstat (limited to 'lib/irb')
-rw-r--r-- | lib/irb/init.rb | 7 | ||||
-rw-r--r-- | lib/irb/lc/error.rb | 1 | ||||
-rw-r--r-- | lib/irb/lc/ja/error.rb | 1 |
3 files changed, 8 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 diff --git a/lib/irb/lc/error.rb b/lib/irb/lc/error.rb index 57872ec65e..c0c6c30d79 100644 --- a/lib/irb/lc/error.rb +++ b/lib/irb/lc/error.rb @@ -25,6 +25,7 @@ module IRB def_exception :CantShiftToMultiIrbMode, "Can't shift to multi irb mode." def_exception :CantChangeBinding, "Can't change binding to (%s)." def_exception :UndefinedPromptMode, "Undefined prompt mode(%s)." + def_exception :IllegalRCGenerator, 'Define illegal RC_NAME_GENERATOR.' end # :startdoc: diff --git a/lib/irb/lc/ja/error.rb b/lib/irb/lc/ja/error.rb index 16a9138938..4f09d781cb 100644 --- a/lib/irb/lc/ja/error.rb +++ b/lib/irb/lc/ja/error.rb @@ -24,6 +24,7 @@ module IRB def_exception :CantShiftToMultiIrbMode, 'multi-irb modeに移れません.' def_exception :CantChangeBinding, 'バインディング(%s)に変更できません.' def_exception :UndefinedPromptMode, 'プロンプトモード(%s)は定義されていません.' + def_exception :IllegalRCNameGenerator, 'RC_NAME_GENERATORが正しく定義されていません.' end # :startdoc: # vim:fileencoding=utf-8 |