From cc042b0ca6aa136fca967b11cff8b57fa568344e Mon Sep 17 00:00:00 2001 From: ser Date: Mon, 16 Feb 2004 22:24:45 +0000 Subject: Issue11: null context causing indentation crash git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@5742 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/rexml/node.rb | 2 +- lib/rexml/rexml.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/rexml') diff --git a/lib/rexml/node.rb b/lib/rexml/node.rb index 9f51b51fc..5f414c03e 100644 --- a/lib/rexml/node.rb +++ b/lib/rexml/node.rb @@ -25,7 +25,7 @@ module REXML end def indent to, ind - if @parent and not @parent.context[:indentstyle].nil? then + if @parent and @parent.context and not @parent.context[:indentstyle].nil? then indentstyle = @parent.context[:indentstyle] else indentstyle = ' ' diff --git a/lib/rexml/rexml.rb b/lib/rexml/rexml.rb index 5ff907542..4d2a95b02 100644 --- a/lib/rexml/rexml.rb +++ b/lib/rexml/rexml.rb @@ -22,5 +22,5 @@ module REXML Copyright = "Copyright #{Time.now.year} Sean Russell " Date = "+2004/047" - Version = "2.7.4.1" + Version = "2.7.4.2" end -- cgit