Skip to content

Commit

Permalink
Use File#expand_path for require's in script/* for Ruby 1.9.2 compati…
Browse files Browse the repository at this point in the history
…bility. #4050

Since Ruby 1.9.2, LOAD_PATH does not include "." directory anymore, so
we should use absolute paths instead to ensure both 1.8.x and 1.9.x
compatibility. It has been included in railties 2.3.x branch since
july 2009, see http://github.com/rails/rails/commit/7a427a83ca4da92c70760007aaf313638a5d8374

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4359 e93f8b46-1217-0410-a6f0-8f06a7374b81
  • Loading branch information
jbbarth committed Nov 2, 2010
1 parent bed79f5 commit 27049b8
Show file tree
Hide file tree
Showing 16 changed files with 23 additions and 23 deletions.
2 changes: 1 addition & 1 deletion script/about
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../config/boot'
require File.expand_path('../../config/boot', __FILE__)
$LOAD_PATH.unshift "#{RAILTIES_PATH}/builtin/rails_info"
require 'commands/about'

Expand Down
4 changes: 2 additions & 2 deletions script/breakpointer
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../config/boot'
require 'commands/breakpointer'
require File.expand_path('../../config/boot', __FILE__)
require 'commands/breakpointer'
4 changes: 2 additions & 2 deletions script/console
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../config/boot'
require 'commands/console'
require File.expand_path('../../config/boot', __FILE__)
require 'commands/console'
2 changes: 1 addition & 1 deletion script/dbconsole
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../config/boot'
require File.expand_path('../../config/boot', __FILE__)
require 'commands/dbconsole'
4 changes: 2 additions & 2 deletions script/destroy
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../config/boot'
require 'commands/destroy'
require File.expand_path('../../config/boot', __FILE__)
require 'commands/destroy'
4 changes: 2 additions & 2 deletions script/generate
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../config/boot'
require 'commands/generate'
require File.expand_path('../../config/boot', __FILE__)
require 'commands/generate'
2 changes: 1 addition & 1 deletion script/performance/benchmarker
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../../config/boot'
require File.expand_path('../../../config/boot', __FILE__)
require 'commands/performance/benchmarker'
2 changes: 1 addition & 1 deletion script/performance/profiler
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../../config/boot'
require File.expand_path('../../../config/boot', __FILE__)
require 'commands/performance/profiler'
2 changes: 1 addition & 1 deletion script/performance/request
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../../config/boot'
require File.expand_path('../../config/boot', __FILE__)
require 'commands/performance/request'
4 changes: 2 additions & 2 deletions script/plugin
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../config/boot'
require 'commands/plugin'
require File.expand_path('../../config/boot', __FILE__)
require 'commands/plugin'
2 changes: 1 addition & 1 deletion script/process/inspector
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../../config/boot'
require File.expand_path('../../config/boot', __FILE__)
require 'commands/process/inspector'
2 changes: 1 addition & 1 deletion script/process/reaper
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../../config/boot'
require File.expand_path('../../config/boot', __FILE__)
require 'commands/process/reaper'
2 changes: 1 addition & 1 deletion script/process/spawner
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../../config/boot'
require File.expand_path('../../config/boot', __FILE__)
require 'commands/process/spawner'
2 changes: 1 addition & 1 deletion script/process/spinner
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../../config/boot'
require File.expand_path('../../config/boot', __FILE__)
require 'commands/process/spinner'
4 changes: 2 additions & 2 deletions script/runner
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../config/boot'
require 'commands/runner'
require File.expand_path('../../config/boot', __FILE__)
require 'commands/runner'
4 changes: 2 additions & 2 deletions script/server
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../config/boot'
require 'commands/server'
require File.expand_path('../../config/boot', __FILE__)
require 'commands/server'

0 comments on commit 27049b8

Please sign in to comment.