This page contains automated test results for code from O'Reilly's Ruby Cookbook. If this code looks interesting or useful, you might want to buy the whole book.

Including Namespaces
CodeExpectedActual
require 'rexml/document'
REXML::Document.new(xml)
require 'rexml/document'
include REXML
Document.new(xml)
require 'rexml/parsers/pullparser'
REXML::Parsers::PullParser.new("Some XML")
require 'rexml/parsers/pullparser'
include REXML::Parsers
PullParser.new("Some XML")
#<REXML::Parsers::PullParser:0xb7c226b8 @listeners=nil, @my_stack=[], @parser=#<REXML::Parsers::BaseParser:0xb7c2267c @stack=[], @tags=[], @entities=[], @document_status=nil, @source=#<REXML::Source:0xb7c2262c @buffer="Some XML", @to_utf=false, @encoding="UTF-8", @line_break=">", @orig="Some XML", @line=0>, @closed=nil>, @entities={}>