aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSantiago Pastorino <santiago@wyeworks.com>2012-05-13 09:25:01 -0700
committerSantiago Pastorino <santiago@wyeworks.com>2012-05-13 09:25:01 -0700
commit59b773705e4d91c458a9572dc63c11eab85e633f (patch)
tree18a35cf6371311059f4a1a81a4dbba2c8b09496b
parentaeac0bf620ab4504aceccf5cc3997c7a4ed96791 (diff)
parentd8c194968469f3afe39412818505ac94f78e386d (diff)
downloadrails-59b773705e4d91c458a9572dc63c11eab85e633f.tar.gz
rails-59b773705e4d91c458a9572dc63c11eab85e633f.tar.bz2
rails-59b773705e4d91c458a9572dc63c11eab85e633f.zip
Merge pull request #6303 from korny/remove-require-rubygems
require "rubygems" is obsolete in Ruby 1.9.3
-rw-r--r--guides/source/action_view_overview.textile2
-rw-r--r--guides/source/active_model_basics.textile1
-rw-r--r--load_paths.rb1
-rw-r--r--railties/lib/rails/commands/application.rb1
-rw-r--r--railties/lib/rails/commands/plugin_new.rb2
-rw-r--r--railties/lib/rails/generators/rails/app/templates/config/boot.rb2
-rw-r--r--railties/lib/rails/generators/rails/plugin_new/templates/rails/boot.rb1
-rw-r--r--railties/lib/rails/generators/test_unit/plugin/templates/test_helper.rb1
-rwxr-xr-xtools/profile1
9 files changed, 0 insertions, 12 deletions
diff --git a/guides/source/action_view_overview.textile b/guides/source/action_view_overview.textile
index fd1b6c5fc2..bde30ba21c 100644
--- a/guides/source/action_view_overview.textile
+++ b/guides/source/action_view_overview.textile
@@ -59,7 +59,6 @@ Now we'll create a simple "Hello World" application that uses the +titleize+ met
*hello_world.rb:*
<ruby>
-require 'rubygems'
require 'active_support/core_ext/string/inflections'
require 'rack'
@@ -94,7 +93,6 @@ Now we'll create the same "Hello World" application in Sinatra.
*hello_world.rb:*
<ruby>
-require 'rubygems'
require 'action_view'
require 'sinatra'
diff --git a/guides/source/active_model_basics.textile b/guides/source/active_model_basics.textile
index 98b3533000..f140a8d2ac 100644
--- a/guides/source/active_model_basics.textile
+++ b/guides/source/active_model_basics.textile
@@ -95,7 +95,6 @@ h4. Dirty
An object becomes dirty when an object is gone through one or more changes to its attributes and not yet saved. This gives the ability to check whether an object has been changed or not. It also has attribute based accessor methods. Lets consider a Person class with attributes first_name and last_name
<ruby>
-require 'rubygems'
require 'active_model'
class Person
diff --git a/load_paths.rb b/load_paths.rb
index 6b224d4ad5..0ad8fcfeda 100644
--- a/load_paths.rb
+++ b/load_paths.rb
@@ -1,4 +1,3 @@
# bust gem prelude
-require 'rubygems' unless defined? Gem
require 'bundler'
Bundler.setup
diff --git a/railties/lib/rails/commands/application.rb b/railties/lib/rails/commands/application.rb
index 60d1aed73a..2cb6d5ca2e 100644
--- a/railties/lib/rails/commands/application.rb
+++ b/railties/lib/rails/commands/application.rb
@@ -19,7 +19,6 @@ else
end
end
-require 'rubygems' if ARGV.include?("--dev")
require 'rails/generators'
require 'rails/generators/rails/app/app_generator'
diff --git a/railties/lib/rails/commands/plugin_new.rb b/railties/lib/rails/commands/plugin_new.rb
index 0287ba0638..4d7bf3c9f3 100644
--- a/railties/lib/rails/commands/plugin_new.rb
+++ b/railties/lib/rails/commands/plugin_new.rb
@@ -1,5 +1,3 @@
-require 'rubygems' if ARGV.include?("--dev")
-
if ARGV.first != "new"
ARGV[0] = "--help"
else
diff --git a/railties/lib/rails/generators/rails/app/templates/config/boot.rb b/railties/lib/rails/generators/rails/app/templates/config/boot.rb
index 4489e58688..3596736667 100644
--- a/railties/lib/rails/generators/rails/app/templates/config/boot.rb
+++ b/railties/lib/rails/generators/rails/app/templates/config/boot.rb
@@ -1,5 +1,3 @@
-require 'rubygems'
-
# Set up gems listed in the Gemfile.
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
diff --git a/railties/lib/rails/generators/rails/plugin_new/templates/rails/boot.rb b/railties/lib/rails/generators/rails/plugin_new/templates/rails/boot.rb
index eba0681370..c78bfb7f63 100644
--- a/railties/lib/rails/generators/rails/plugin_new/templates/rails/boot.rb
+++ b/railties/lib/rails/generators/rails/plugin_new/templates/rails/boot.rb
@@ -1,4 +1,3 @@
-require 'rubygems'
gemfile = File.expand_path('../../../../Gemfile', __FILE__)
if File.exist?(gemfile)
diff --git a/railties/lib/rails/generators/test_unit/plugin/templates/test_helper.rb b/railties/lib/rails/generators/test_unit/plugin/templates/test_helper.rb
index e82e321914..c9af2ca832 100644
--- a/railties/lib/rails/generators/test_unit/plugin/templates/test_helper.rb
+++ b/railties/lib/rails/generators/test_unit/plugin/templates/test_helper.rb
@@ -1,3 +1,2 @@
-require 'rubygems'
require 'minitest/autorun'
require 'active_support'
diff --git a/tools/profile b/tools/profile
index 51cb7f33e8..6cc935bce5 100755
--- a/tools/profile
+++ b/tools/profile
@@ -7,7 +7,6 @@ ENV['NO_RELOAD'] ||= '1'
ENV['RAILS_ENV'] ||= 'development'
GC.enable_stats
-require 'rubygems'
Gem.source_index
require 'benchmark'