Skip to content
This repository
Browse code

String#to_a is not available in 1.9

  • Loading branch information...
commit 255d9f5ac1f2afa5a293a4b45d3aa17a31da46bf 1 parent 5ad5215
Piotr Sarnacki authored December 09, 2011
2  activerecord/lib/active_record/migration.rb
@@ -503,7 +503,7 @@ def migrations_identical?(a, b)
503 503
 
504 504
     def remove_origin_comment(migration_source)
505 505
       if migration_source =~ /^# This migration comes from/
506  
-        migration_source = migration_source.to_a[1..-1].join
  506
+        migration_source = migration_source.lines.to_a[1..-1].join
507 507
       end
508 508
 
509 509
       migration_source
2  activerecord/test/cases/migration_test.rb
@@ -2258,7 +2258,7 @@ def test_skip_ignores_origin_comment
2258 2258
 
2259 2259
       # remove origin comment
2260 2260
       migration = @migrations_path + "/4_people_have_hobbies.rb"
2261  
-      migration_source = File.read(migration).to_a[1..-1].join
  2261
+      migration_source = File.read(migration).lines.to_a[1..-1].join
2262 2262
       File.open(migration, "w") { |f| f.write migration_source }
2263 2263
 
2264 2264
       ActiveRecord::Migration.copy(@migrations_path, sources, :on_skip => on_skip)

0 notes on commit 255d9f5

Please sign in to comment.
Something went wrong with that request. Please try again.