Skip to content

Commit

Permalink
FIXED: Removed bad default value setting.
Browse files Browse the repository at this point in the history
  • Loading branch information
delano committed May 21, 2011
1 parent d5d46e8 commit 135cdf4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion CHANGES.txt
@@ -1,8 +1,11 @@
STORABLE, CHANGES

* TODO: https://github.com/delano/storable/pull/2
* TODO: Handle nested hashes and arrays.
* TODO: Handle nested hashes and arrays.

#### 0.8.9 (GREAT RAPTURE) ##########################

* FIXED: Removed bad default value setting.

#### 0.8.8 (2011-05-20) #############################

Expand Down
2 changes: 1 addition & 1 deletion lib/storable.rb
Expand Up @@ -104,7 +104,7 @@ def self.field(*args, &processor)
STDERR.puts "method exists: #{self}##{fname}" if Storable.debug
else
define_method(fname) do
ret = instance_variable_get("@#{fname}") || opts[:default]
ret = instance_variable_get("@#{fname}")
if ret.nil?
if opts[:default]
ret = opts[:default]
Expand Down

0 comments on commit 135cdf4

Please sign in to comment.