Skip to content

Instantly share code, notes, and snippets.

@llowder
Created October 16, 2015 03:16
Show Gist options
  • Save llowder/5aa74f6c7f5d38c08d32 to your computer and use it in GitHub Desktop.
Save llowder/5aa74f6c7f5d38c08d32 to your computer and use it in GitHub Desktop.
irb(main):002:0> require 'xmlsimple'
=> true
irb(main):003:0> all_run_data = Array.new
=> []
irb(main):004:0> def xmltest
<sources/*.tcx").each_with_index do |runfile, index|
irb(main):006:2* all_run_data[index] = xmlsimple.xml_in runfile
irb(main):007:2> end
irb(main):008:1> end
=> :xmltest
irb(main):009:0> xmltest
NameError: undefined local variable or method `all_run_data' for main:Object
from (irb):6:in `block in xmltest'
from (irb):5:in `each'
from (irb):5:in `each_with_index'
from (irb):5:in `xmltest'
from (irb):9
from C:/Ruby21-x64/bin/irb:11:in `<main>'
irb(main):010:0>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment