Created
January 13, 2012 21:35
-
-
Save seancribbs/1608821 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'builder' | |
puts "Creating xml obj" | |
xml = Builder::XmlMarkup.new | |
puts "Top-level element" | |
xml.add | |
puts "Two-level nesting" | |
xml.add { xml.doc } | |
puts "Three-level nesting" | |
xml.add { xml.doc { xml.field } } | |
puts "Three-level nesting with attribute" | |
xml.add { xml.doc { xml.field('foo' => 'bar') } } | |
puts "Three-level nesting with attribute and text element" | |
xml.add { xml.doc { xml.field('foo' => 'bar') { xml.text!("baz") } } } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Creating xml obj | |
Top-level element | |
Two-level nesting | |
Three-level nesting | |
Three-level nesting with attribute | |
--------------------------------------------- | |
CRASH: A fatal error has occurred. | |
Backtrace: | |
rbx[0x819bdb0] | |
[0xa68400] | |
/lib/i386-linux-gnu/libc.so.6(+0x115997)[0x5c9997] | |
rbx(_ZN8rubinius6String10tr_replaceEPNS_5StateEPNS_7tr_dataE+0x9c)[0x8318e3c] | |
rbx(_ZN8rubinius6String9tr_expandEPNS_5StateEPNS_6ObjectES4_+0x366)[0x8319246] | |
rbx(_ZN8rubinius10Primitives16string_tr_expandEPNS_5StateEPNS_9CallFrameEPNS_10ExecutableEPNS_6ModuleERNS_9ArgumentsE+0x104)[0x821df24] | |
rbx(_ZN8rubinius11InlineCache11empty_cacheEPNS_5StateEPS0_PNS_9CallFrameERNS_9ArgumentsE+0xfc)[0x81a8d5c] | |
rbx(_ZN8rubinius8VMMethod11interpreterEPNS_5StateEPS0_PNS_20InterpreterCallFrameE+0x10a)[0x81bb4da] | |
rbx(_ZN8rubinius8VMMethod19execute_specializedINS_14ThreeArgumentsEEEPNS_6ObjectEPNS_5StateEPNS_9CallFrameEPNS_10ExecutableEPNS_6ModuleERNS_9ArgumentsE+0x276)[0x82a20d6] | |
rbx(_ZN8rubinius11InlineCache19empty_cache_privateEPNS_5StateEPS0_PNS_9CallFrameERNS_9ArgumentsE+0xce)[0x81a8abe] | |
rbx(_ZN8rubinius8VMMethod11interpreterEPNS_5StateEPS0_PNS_20InterpreterCallFrameE+0x10a)[0x81bb4da] | |
rbx(_ZN8rubinius8VMMethod19execute_specializedINS_12TwoArgumentsEEEPNS_6ObjectEPNS_5StateEPNS_9CallFrameEPNS_10ExecutableEPNS_6ModuleERNS_9ArgumentsE+0x26e)[0x82a24be] | |
rbx(_ZN8rubinius11InlineCache11empty_cacheEPNS_5StateEPS0_PNS_9CallFrameERNS_9ArgumentsE+0xfc)[0x81a8d5c] | |
rbx(_ZN8rubinius8VMMethod11interpreterEPNS_5StateEPS0_PNS_20InterpreterCallFrameE+0x10a)[0x81bb4da] | |
rbx(_ZN8rubinius8VMMethod19execute_specializedINS_12TwoArgumentsEEEPNS_6ObjectEPNS_5StateEPNS_9CallFrameEPNS_10ExecutableEPNS_6ModuleERNS_9ArgumentsE+0x26e)[0x82a24be] | |
rbx(_ZN8rubinius11InlineCache11empty_cacheEPNS_5StateEPS0_PNS_9CallFrameERNS_9ArgumentsE+0xfc)[0x81a8d5c] | |
rbx(_ZN8rubinius8VMMethod11interpreterEPNS_5StateEPS0_PNS_20InterpreterCallFrameE+0x10a)[0x81bb4da] | |
rbx(_ZN8rubinius8VMMethod19execute_specializedINS_11OneArgumentEEEPNS_6ObjectEPNS_5StateEPNS_9CallFrameEPNS_10ExecutableEPNS_6ModuleERNS_9ArgumentsE+0x25e)[0x82a288e] | |
rbx(_ZN8rubinius14CompiledMethod16default_executorEPNS_5StateEPNS_9CallFrameEPNS_10ExecutableEPNS_6ModuleERNS_9ArgumentsE+0xe5)[0x82b1555] | |
rbx(_ZN8rubinius11InlineCache11empty_cacheEPNS_5StateEPS0_PNS_9CallFrameERNS_9ArgumentsE+0xfc)[0x81a8d5c] | |
rbx(_ZN8rubinius8VMMethod11interpreterEPNS_5StateEPS0_PNS_20InterpreterCallFrameE+0x10a)[0x81bb4da] | |
rbx(_ZN8rubinius8VMMethod19execute_specializedINS_11OneArgumentEEEPNS_6ObjectEPNS_5StateEPNS_9CallFrameEPNS_10ExecutableEPNS_6ModuleERNS_9ArgumentsE+0x25e)[0x82a288e] | |
rbx(_ZN8rubinius14CompiledMethod16default_executorEPNS_5StateEPNS_9CallFrameEPNS_10ExecutableEPNS_6ModuleERNS_9ArgumentsE+0xe5)[0x82b1555] | |
rbx(_ZN8rubinius11InlineCache19empty_cache_privateEPNS_5StateEPS0_PNS_9CallFrameERNS_9ArgumentsE+0xce)[0x81a8abe] | |
rbx(_ZN8rubinius8VMMethod11interpreterEPNS_5StateEPS0_PNS_20InterpreterCallFrameE+0x10a)[0x81bb4da] | |
rbx(_ZN8rubinius8VMMethod19execute_specializedINS_11OneArgumentEEEPNS_6ObjectEPNS_5StateEPNS_9CallFrameEPNS_10ExecutableEPNS_6ModuleERNS_9ArgumentsE+0x25e)[0x82a288e] | |
rbx(_ZN8rubinius14CompiledMethod16default_executorEPNS_5StateEPNS_9CallFrameEPNS_10ExecutableEPNS_6ModuleERNS_9ArgumentsE+0xe5)[0x82b1555] | |
rbx(_ZN8rubinius11InlineCache19empty_cache_privateEPNS_5StateEPS0_PNS_9CallFrameERNS_9ArgumentsE+0xce)[0x81a8abe] | |
rbx(_ZN8rubinius8VMMethod11interpreterEPNS_5StateEPS0_PNS_20InterpreterCallFrameE+0x10a)[0x81bb4da] | |
rbx(_ZN8rubinius8VMMethod19execute_specializedINS_11OneArgumentEEEPNS_6ObjectEPNS_5StateEPNS_9CallFrameEPNS_10ExecutableEPNS_6ModuleERNS_9ArgumentsE+0x25e)[0x82a288e] | |
rbx(_ZN8rubinius14CompiledMethod16default_executorEPNS_5StateEPNS_9CallFrameEPNS_10ExecutableEPNS_6ModuleERNS_9ArgumentsE+0xe5)[0x82b1555] | |
rbx(_ZN8rubinius11InlineCache19empty_cache_privateEPNS_5StateEPS0_PNS_9CallFrameERNS_9ArgumentsE+0xce)[0x81a8abe] | |
rbx(_ZN8rubinius8VMMethod11interpreterEPNS_5StateEPS0_PNS_20InterpreterCallFrameE+0x10a)[0x81bb4da] | |
rbx(_ZN8rubinius16BlockEnvironment19execute_interpreterEPNS_5StateEPNS_9CallFrameEPS0_RNS_9ArgumentsERNS_15BlockInvocationE+0x1f1)[0x82a9451] | |
rbx(_ZN8rubinius16BlockEnvironment6invokeEPNS_5StateEPNS_9CallFrameEPS0_RNS_9ArgumentsERNS_15BlockInvocationE+0x8f)[0x82a9bff] | |
rbx(_ZN8rubinius16BlockEnvironment4callEPNS_5StateEPNS_9CallFrameERNS_9ArgumentsEi+0x60)[0x82a9d30] | |
rbx(_ZN8rubinius8VMMethod11interpreterEPNS_5StateEPS0_PNS_20InterpreterCallFrameE+0x41dc)[0x81bf5ac] | |
rbx(_ZN8rubinius8VMMethod19execute_specializedINS_11NoArgumentsEEEPNS_6ObjectEPNS_5StateEPNS_9CallFrameEPNS_10ExecutableEPNS_6ModuleERNS_9ArgumentsE+0x1ce)[0x82a2f5e] | |
rbx(_ZN8rubinius11InlineCache11empty_cacheEPNS_5StateEPS0_PNS_9CallFrameERNS_9ArgumentsE+0xfc)[0x81a8d5c] | |
rbx(_ZN8rubinius8VMMethod11interpreterEPNS_5StateEPS0_PNS_20InterpreterCallFrameE+0x1c0b)[0x81bcfdb] | |
rbx(_ZN8rubinius8VMMethod19execute_specializedINS_16GenericArgumentsEEEPNS_6ObjectEPNS_5StateEPNS_9CallFrameEPNS_10ExecutableEPNS_6ModuleERNS_9ArgumentsE+0x201)[0x82a1611] | |
rbx(_ZN8rubinius11InlineCache11check_cacheEPNS_5StateEPS0_PNS_9CallFrameERNS_9ArgumentsE+0x97)[0x81a7a67] | |
rbx(_ZN8rubinius8VMMethod11interpreterEPNS_5StateEPS0_PNS_20InterpreterCallFrameE+0x10a)[0x81bb4da] | |
rbx(_ZN8rubinius8VMMethod19execute_specializedINS_16GenericArgumentsEEEPNS_6ObjectEPNS_5StateEPNS_9CallFrameEPNS_10ExecutableEPNS_6ModuleERNS_9ArgumentsE+0x201)[0x82a1611] | |
rbx(_ZN8rubinius11InlineCache11check_cacheEPNS_5StateEPS0_PNS_9CallFrameERNS_9ArgumentsE+0x97)[0x81a7a67] | |
rbx(_ZN8rubinius8VMMethod11interpreterEPNS_5StateEPS0_PNS_20InterpreterCallFrameE+0x10a)[0x81bb4da] | |
rbx(_ZN8rubinius8VMMethod19execute_specializedINS_16GenericArgumentsEEEPNS_6ObjectEPNS_5StateEPNS_9CallFrameEPNS_10ExecutableEPNS_6ModuleERNS_9ArgumentsE+0x201)[0x82a1611] | |
rbx(_ZN8rubinius11InlineCache11empty_cacheEPNS_5StateEPS0_PNS_9CallFrameERNS_9ArgumentsE+0xfc)[0x81a8d5c] | |
rbx(_ZN8rubinius8VMMethod11interpreterEPNS_5StateEPS0_PNS_20InterpreterCallFrameE+0x10a)[0x81bb4da] | |
rbx(_ZN8rubinius16BlockEnvironment19execute_interpreterEPNS_5StateEPNS_9CallFrameEPS0_RNS_9ArgumentsERNS_15BlockInvocationE+0x1f1)[0x82a9451] | |
rbx(_ZN8rubinius16BlockEnvironment6invokeEPNS_5StateEPNS_9CallFrameEPS0_RNS_9ArgumentsERNS_15BlockInvocationE+0x8f)[0x82a9bff] | |
rbx(_ZN8rubinius16BlockEnvironment4callEPNS_5StateEPNS_9CallFrameERNS_9ArgumentsEi+0x60)[0x82a9d30] | |
rbx(_ZN8rubinius4Proc4callEPNS_5StateEPNS_9CallFrameERNS_9ArgumentsE+0x292)[0x8313432] | |
rbx(_ZN8rubinius4Proc9call_primEPNS_5StateEPNS_9CallFrameEPNS_10ExecutableEPNS_6ModuleERNS_9ArgumentsE+0x33)[0x8313633] | |
rbx(_ZN8rubinius10Primitives9proc_callEPNS_5StateEPNS_9CallFrameEPNS_10ExecutableEPNS_6ModuleERNS_9ArgumentsE+0xd5)[0x822bbc5] | |
rbx(_ZN8rubinius11InlineCache21check_cache_referenceEPNS_5StateEPS0_PNS_9CallFrameERNS_9ArgumentsE+0x80)[0x81a78f0] | |
rbx(_ZN8rubinius8VMMethod11interpreterEPNS_5StateEPS0_PNS_20InterpreterCallFrameE+0x10a)[0x81bb4da] | |
rbx(_ZN8rubinius8VMMethod19execute_specializedINS_11OneArgumentEEEPNS_6ObjectEPNS_5StateEPNS_9CallFrameEPNS_10ExecutableEPNS_6ModuleERNS_9ArgumentsE+0x25e)[0x82a288e] | |
rbx(_ZN8rubinius11InlineCache11check_cacheEPNS_5StateEPS0_PNS_9CallFrameERNS_9ArgumentsE+0x97)[0x81a7a67] | |
rbx(_ZN8rubinius8VMMethod11interpreterEPNS_5StateEPS0_PNS_20InterpreterCallFrameE+0x10a)[0x81bb4da] | |
rbx(_ZN8rubinius8VMMethod19execute_specializedINS_16GenericArgumentsEEEPNS_6ObjectEPNS_5StateEPNS_9CallFrameEPNS_10ExecutableEPNS_6ModuleERNS_9ArgumentsE+0x201)[0x82a1611] | |
rbx(_ZN8rubinius11InlineCache11empty_cacheEPNS_5StateEPS0_PNS_9CallFrameERNS_9ArgumentsE+0xfc)[0x81a8d5c] | |
rbx(_ZN8rubinius8VMMethod11interpreterEPNS_5StateEPS0_PNS_20InterpreterCallFrameE+0x1c0b)[0x81bcfdb] | |
rbx(_ZN8rubinius16BlockEnvironment19execute_interpreterEPNS_5StateEPNS_9CallFrameEPS0_RNS_9ArgumentsERNS_15BlockInvocationE+0x1f1)[0x82a9451] | |
Wrote full error report to: /home/vagrant/.rubinius_last_error | |
Run 'rbx report' to submit this crash report! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment