Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: JRuby 1.1.2
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
-
Environment:OS X 10.5.3, JRuby r7022, Rails 2.1.0, activerecord-jdbc-adapter 0.8.2, activerecord-jdbc-sqlite3-adapter 0.8.1 jdbc-sqlite3 3.5.8
-
Number of attachments :
Description
Assume a Model class created by migration such as this:
class CreateModels < ActiveRecord::Migration
def self.up
create_table :models do |t|
t.column :prop, :string, :default => ''
t.timestamps
end
end
def self.down
drop_table :models
end
end
This will yield:
$ jruby script/console
Loading development environment (Rails 2.1.0)
>> m=Model.new
=> #<Model id: nil, prop: nil, created_at: nil, updated_at: nil>
The same model, with MRI 1.8.6-p111, Rails 2.1.0, sqlite3-ruby 1.2.1, yields:
$ ruby script/console
Loading development environment (Rails 2.1.0)
>> m=Model.new
=> #<Model id: nil, prop: "", created_at: nil, updated_at: nil>
Seems like a simple enough change. Have you any opportunity to look at the code and see where to fix it?