Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

rackup: include the value of each -I command line option in $LOAD_PATH #380

Merged
merged 1 commit into from

2 participants

@yeban

rackup -h says '-I' can be used more than once. However, instead of adding
each value to $LOAD_PATH, rackup would discard the value of all but the last
'-I' option.

Signed-off-by: Anurag Priyam anurag08priyam@gmail.com


ruby adds the value of each -I option to $LOAD_PATH.

$ ruby -I . -I .. -e 'puts $LOAD_PATH'

@yeban yeban rackup: include the value of each -I command line option in $LOAD_PATH
`rackup -h` says '-I' can be used more than once.  However, instead of adding
each value to $LOAD_PATH, rackup would discard the value of all but the last
'-I' option.

Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
110dc3a
@raggi raggi merged commit f3de806 into rack:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Apr 26, 2012
  1. @yeban

    rackup: include the value of each -I command line option in $LOAD_PATH

    yeban authored
    `rackup -h` says '-I' can be used more than once.  However, instead of adding
    each value to $LOAD_PATH, rackup would discard the value of all but the last
    '-I' option.
    
    Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/rack/server.rb
View
2  lib/rack/server.rb
@@ -26,7 +26,7 @@ def parse!(args)
opts.on("-I", "--include PATH",
"specify $LOAD_PATH (may be used more than once)") { |path|
- options[:include] = path.split(":")
+ (options[:include] ||= []).concat(path.split(":"))
}
opts.on("-r", "--require LIBRARY",
Something went wrong with that request. Please try again.