1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

String#to_a is not available in 1.9

This commit is contained in:
Piotr Sarnacki 2011-12-09 10:33:37 +01:00
parent 5ad5215211
commit 255d9f5ac1
2 changed files with 2 additions and 2 deletions

View file

@ -503,7 +503,7 @@ module ActiveRecord
def remove_origin_comment(migration_source)
if migration_source =~ /^# This migration comes from/
migration_source = migration_source.to_a[1..-1].join
migration_source = migration_source.lines.to_a[1..-1].join
end
migration_source

View file

@ -2258,7 +2258,7 @@ if ActiveRecord::Base.connection.supports_migrations?
# remove origin comment
migration = @migrations_path + "/4_people_have_hobbies.rb"
migration_source = File.read(migration).to_a[1..-1].join
migration_source = File.read(migration).lines.to_a[1..-1].join
File.open(migration, "w") { |f| f.write migration_source }
ActiveRecord::Migration.copy(@migrations_path, sources, :on_skip => on_skip)