Skip to content

Commit

Permalink
Exclude some ivars in Exception's yaml output. Fixes rubinius#214.
Browse files Browse the repository at this point in the history
  • Loading branch information
Evan Phoenix committed Mar 29, 2010
1 parent b5e8e71 commit c937e5d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions kernel/common/exception.rb
Expand Up @@ -10,6 +10,16 @@ def initialize(message = nil)
@custom_backtrace = nil
end

# This is here rather than in yaml.rb because it contains "private"
# information, ie, the list of ivars. Putting it over in the yaml
# sounce means it's easy to forget about.
def to_yaml_properties
list = super
list.delete "@backtrace"
list.delete "@custom_backtrace"
return list
end

def message
@reason_message
end
Expand Down

0 comments on commit c937e5d

Please sign in to comment.