summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHomu <homu@barosl.com>2016-09-29 06:33:51 +0900
committerHomu <homu@barosl.com>2016-09-29 06:33:51 +0900
commitdd6aef97a5f2e7173f406267256a8c319d6134ab (patch)
tree342feb44eaa0d5a2e1b56ecd219e55ef2c8a7b01
parent263fef26c467e577d2566330ce71b575663a5723 (diff)
parent4fe92919f51e3463f0aad6fa833ab68044311f03 (diff)
downloadbundler-dd6aef97a5f2e7173f406267256a8c319d6134ab.tar.gz
Auto merge of #5029 - mattbrictson:patch-3, r=segiddins
Improve IRB behavior in generated bin/console `IRB.start` expects an argument with the name of the script being executed. When this argument is omitted, IRB does not search the filesystem for `.irbrc` files. That means that developers who have customized their IRB settings with an `~/.irbrc` will not benefit from those customizations when using Bundler's default `bin/console` script. Fix this by editing the `bin/console` template to pass `__FILE__` to `IRB.start`. This makes `bin/console` consistent with Ruby's builtin `bin/irb` command. https://github.com/ruby/ruby/blob/9f9add3eb5006473dfabac3e994e904b5c1979fe/bin/irb#L11
-rw-r--r--lib/bundler/templates/newgem/bin/console.tt2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/bundler/templates/newgem/bin/console.tt b/lib/bundler/templates/newgem/bin/console.tt
index f402bd639e..a27f82430f 100644
--- a/lib/bundler/templates/newgem/bin/console.tt
+++ b/lib/bundler/templates/newgem/bin/console.tt
@@ -11,4 +11,4 @@ require "<%= config[:namespaced_path] %>"
# Pry.start
require "irb"
-IRB.start
+IRB.start(__FILE__)