Ticket #115 (closed defect: fixed)

Opened 3 years ago

Last modified 2 years ago

NameError: undefined local variable or method 'transitive' in document.rb, line number 187

Reported by: msimbartl Owned by: ser
Priority: normal Milestone:
Component: DOM Version:
Severity: critical Keywords:
Cc: Ruby version: Other
Operating system: All

Description

Hi,

we've switched to the new version of ruby 1.8.6 (2007-09-23 patchlevel 110) with the current version of REXML 3.1.7 and looks like there is a bug in document.rb. Exception says: NameError: undefined local variable or method 'transitive' .

I took a closer look at the source code and the problem seems to be obvious.

Line number 187, file trunk/src/rexml/document.rb, current revision (1277) says:

 ...
if transitive
 ...

I believe it should be changed to:

 ...
if trans
 ...

since, at the line number 182, the method write() of the class Document is declared as:

def write( output=$stdout, indent=-1, trans=false, ie_hack=false )

Looks like this bug was introduced in revision 1256.

Hope I did not miss something.

Martin

Change History

Changed 3 years ago by ser

  • status changed from new to assigned

Changed 3 years ago by ser

  • status changed from assigned to closed
  • resolution set to fixed

Fixed by changeset:1283.

Thanks for the outstanding bug report.

Changed 2 years ago by janek

  • status changed from closed to reopened
  • resolution deleted

Broken again by changeset:1291.

Changed 2 years ago by ser

  • status changed from reopened to closed
  • resolution set to fixed

Fixed, again, by [546].

This commit adds a unit test to ensure that the regression doesn't happen again.

Note: See TracTickets for help on using tickets.