diff options
-rw-r--r-- | lib/irb/init.rb | 5 | ||||
-rw-r--r-- | test/irb/test_cmd.rb | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/lib/irb/init.rb b/lib/irb/init.rb index 09099f88b7..8c9d473b74 100644 --- a/lib/irb/init.rb +++ b/lib/irb/init.rb @@ -159,7 +159,10 @@ module IRB # :nodoc: @CONF[:AT_EXIT] = [] - @CONF[:COMMAND_ALIASES] = {} + @CONF[:COMMAND_ALIASES] = { + :'$' => :show_source, + :'@' => :whereami, + } end def IRB.set_measure_callback(type = nil, arg = nil, &block) diff --git a/test/irb/test_cmd.rb b/test/irb/test_cmd.rb index f2d8a0299b..d233cbb9b5 100644 --- a/test/irb/test_cmd.rb +++ b/test/irb/test_cmd.rb @@ -551,7 +551,6 @@ module TestIRB def test_whereami_alias out, err = execute_lines( "@\n", - conf: { COMMAND_ALIASES: { :'@' => :whereami } } ) assert_empty err assert_match(/^From: .+ @ line \d+ :\n/, out) @@ -563,7 +562,6 @@ module TestIRB out, err = execute_lines( "@foo\n", "$bar\n", - conf: { COMMAND_ALIASES: { :'$' => :show_source, :'@' => :whereami } } ) assert_empty err assert_match(/"foo"/, out) |