public
Description: Ruby on Rails
Homepage: http://rubyonrails.org
Clone URL: git://github.com/rails/rails.git
Ruby 1.9 compatibility. References #1689.


git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8431 
5ecf4fe2-1ee6-0310-87b1-e25e094e27de
jeremy (author)
Mon Dec 17 10:54:55 -0800 2007
commit  ab9e4c0eaacba34c9f1d16cf34c82e0e906edad5
tree    968f6acc717f524c8ff9bae281663016452da07d
parent  0f6c86ff40d0b0efe672ae76f2b5b536feaf7255
...
 
 
 
 
 
1
2
3
...
1
2
3
4
5
6
7
8
0
@@ -1,3 +1,8 @@
0
+*SVN*
0
+
0
+* Ruby 1.9 compatibility. #1689 [Cheah Chu Yeow]
0
+
0
+
0
 *2.0.2* (December 16th, 2007)
0
 
0
 * Changed the default database from mysql to sqlite3, so now running "rails myapp" will have a config/database.yml that's setup for SQLite3 (which in OS X Leopard is installed by default, so is the gem, so everything Just Works with no database configuration at all). To get a Rails application preconfigured for MySQL, just run "rails -d mysql myapp" [DHH]
...
31
32
33
34
 
35
36
37
...
62
63
64
65
 
66
67
68
...
31
32
33
 
34
35
36
37
...
62
63
64
 
65
66
67
68
0
@@ -31,7 +31,7 @@ def listener_socket(number)
0
   File.expand_path(File.join(File.dirname(__FILE__), "../log/drb_gateway/listener_#{number}.sock"))
0
 end
0
 
0
-unless File.exists? TrackerSocket
0
+unless File.exist? TrackerSocket
0
   message "Starting tracker and #{Listeners} listeners"
0
   fork do
0
     Process.setsid
0
@@ -62,7 +62,7 @@ unless File.exists? TrackerSocket
0
   ready = false
0
   10.times do
0
     sleep 0.5
0
- break if (ready = File.exists?(TrackerSocket) && File.exists?(listener_socket(0)))
0
+ break if (ready = File.exist?(TrackerSocket) && File.exist?(listener_socket(0)))
0
   end
0
 
0
   if ready
...
24
25
26
27
28
29
 
30
31
32
...
24
25
26
 
27
 
28
29
30
31
0
@@ -24,9 +24,8 @@ module Rails
0
       File.exist?("#{RAILS_ROOT}/vendor/rails")
0
     end
0
 
0
- # FIXME : Ruby 1.9
0
     def preinitialize
0
- load(preinitializer_path) if File.exists?(preinitializer_path)
0
+ load(preinitializer_path) if File.exist?(preinitializer_path)
0
     end
0
 
0
     def preinitializer_path
...
16
17
18
19
20
21
 
 
 
22
23
24
...
16
17
18
 
 
 
19
20
21
22
23
24
0
@@ -16,9 +16,9 @@ libs << " -r console_sandbox" if options[:sandbox]
0
 libs << " -r console_with_helpers"
0
 
0
 ENV['RAILS_ENV'] = case ARGV.first
0
- when "p": "production"
0
- when "d": "development"
0
- when "t": "test"
0
+ when "p"; "production"
0
+ when "d"; "development"
0
+ when "t"; "test"
0
   else
0
     ARGV.first || ENV['RAILS_ENV'] || 'development'
0
 end
...
65
66
67
68
 
69
70
71
72
 
73
74
75
...
65
66
67
 
68
69
70
71
 
72
73
74
75
0
@@ -65,11 +65,11 @@ namespace :doc do
0
         options << '-T html'
0
 
0
         files.include("#{plugin_base}/lib/**/*.rb")
0
- if File.exists?("#{plugin_base}/README")
0
+ if File.exist?("#{plugin_base}/README")
0
           files.include("#{plugin_base}/README")
0
           options << "--main '#{plugin_base}/README'"
0
         end
0
- files.include("#{plugin_base}/CHANGELOG") if File.exists?("#{plugin_base}/CHANGELOG")
0
+ files.include("#{plugin_base}/CHANGELOG") if File.exist?("#{plugin_base}/CHANGELOG")
0
 
0
         options << files.to_s
0
 
...
105
106
107
108
 
109
110
111
...
105
106
107
 
108
109
110
111
0
@@ -105,7 +105,7 @@ namespace :rails do
0
       require 'railties_path'
0
       project_dir = RAILS_ROOT + '/public/javascripts/'
0
       scripts = Dir[RAILTIES_PATH + '/html/javascripts/*.js']
0
- scripts.reject!{|s| File.basename(s) == 'application.js'} if File.exists?(project_dir + 'application.js')
0
+ scripts.reject!{|s| File.basename(s) == 'application.js'} if File.exist?(project_dir + 'application.js')
0
       FileUtils.cp(scripts, project_dir)
0
     end
0
 
...
13
14
15
16
 
17
18
19
20
 
21
22
23
...
13
14
15
 
16
17
18
19
 
20
21
22
23
0
@@ -13,11 +13,11 @@ def recent_tests(source_pattern, test_path, touched_since = 10.minutes.ago)
0
 
0
       # For modified files in app/ run the tests for it. ex. /test/functional/account_controller.rb
0
       test = "#{modified_test_path}/#{source_file}_test.rb"
0
- tests.push test if File.exists?(test)
0
+ tests.push test if File.exist?(test)
0
 
0
       # For modified files in app, run tests in subdirs too. ex. /test/functional/account/*_test.rb
0
       test = "#{modified_test_path}/#{File.basename(path, '.rb').sub("_controller","")}"
0
- FileList["#{test}/*_test.rb"].each { |f| tests.push f } if File.exists?(test)
0
+ FileList["#{test}/*_test.rb"].each { |f| tests.push f } if File.exist?(test)
0
     
0
       return tests
0
 
...
36
37
38
 
39
40
41
...
43
44
45
 
46
47
48
...
36
37
38
39
40
41
42
...
44
45
46
47
48
49
50
0
@@ -36,6 +36,7 @@ class BootTest < Test::Unit::TestCase
0
 
0
   def test_boot_vendor_rails_by_default
0
     Rails.expects(:booted?).returns(false)
0
+ Rails.expects(:preinitialize)
0
     File.expects(:exist?).with("#{RAILS_ROOT}/vendor/rails").returns(true)
0
     Rails::VendorBoot.any_instance.expects(:run).returns('result')
0
     assert_equal 'result', Rails.boot!
0
@@ -43,6 +44,7 @@ class BootTest < Test::Unit::TestCase
0
 
0
   def test_boot_gem_rails_otherwise
0
     Rails.expects(:booted?).returns(false)
0
+ Rails.expects(:preinitialize)
0
     File.expects(:exist?).with("#{RAILS_ROOT}/vendor/rails").returns(false)
0
     Rails::GemBoot.any_instance.expects(:run).returns('result')
0
     assert_equal 'result', Rails.boot!

Comments

    No one has commented yet.