[#3292] dir.c --- Dir.chdir error handling — Johan Holmberg <holmberg@...>

55 messages 2004/08/21
[#3350] Re: [PATCH] dir.c --- Dir.chdir error handling — Yukihiro Matsumoto <matz@...> 2004/09/06

Hi, Johan,

[#3351] Re: [PATCH] dir.c --- Dir.chdir error handling — "H.Yamamoto" <ocean@...2.ccsnet.ne.jp> 2004/09/06

Hello.

[#3352] Re: [PATCH] dir.c --- Dir.chdir error handling — Yukihiro Matsumoto <matz@...> 2004/09/06

Hi,

[#3353] Re: [PATCH] dir.c --- Dir.chdir error handling — nobu.nokada@... 2004/09/06

Hi,

[#3354] Re: [PATCH] dir.c --- Dir.chdir error handling — Yukihiro Matsumoto <matz@...> 2004/09/06

Hi,

[#3356] Re: [PATCH] dir.c --- Dir.chdir error handling — nobu.nokada@... 2004/09/07

Hi,

[#3369] Re: [PATCH] dir.c --- Dir.chdir error handling — "H.Yamamoto" <ocean@...2.ccsnet.ne.jp> 2004/09/09

Sorry for late posting. Typhoon striked me.....

[#3372] Re: [PATCH] dir.c --- Dir.chdir error handling — nobu.nokada@... 2004/09/10

Hi,

[#3374] Re: [PATCH] dir.c --- Dir.chdir error handling — "H.Yamamoto" <ocean@...2.ccsnet.ne.jp> 2004/09/10

[#3376] Re: [PATCH] dir.c --- Dir.chdir error handling — nobu.nokada@... 2004/09/10

Hi,

[#3378] Re: [PATCH] dir.c --- Dir.chdir error handling — "H.Yamamoto" <ocean@...2.ccsnet.ne.jp> 2004/09/11

nobu.nokada@softhome.net wrote:

[#3383] Re: [PATCH] dir.c --- Dir.chdir error handling — nobu.nokada@... 2004/09/12

Hi,

[#3384] Re: [PATCH] dir.c --- Dir.chdir error handling — "H.Yamamoto" <ocean@...2.ccsnet.ne.jp> 2004/09/13

[#3385] Re: [PATCH] dir.c --- Dir.chdir error handling — Yukihiro Matsumoto <matz@...> 2004/09/13

Hi,

[#3386] Re: [PATCH] dir.c --- Dir.chdir error handling — "H.Yamamoto" <ocean@...2.ccsnet.ne.jp> 2004/09/13

[#3387] Re: [PATCH] dir.c --- Dir.chdir error handling — ts <decoux@...> 2004/09/13

>>>>> "H" == H Yamamoto <ocean@m2.ccsnet.ne.jp> writes:

[#3392] Re: [PATCH] dir.c --- Dir.chdir error handling — "H.Yamamoto" <ocean@...2.ccsnet.ne.jp> 2004/09/14

[#3393] Re: [PATCH] dir.c --- Dir.chdir error handling — Yukihiro Matsumoto <matz@...> 2004/09/14

Hi,

[#3394] Re: [PATCH] dir.c --- Dir.chdir error handling — "H.Yamamoto" <ocean@...2.ccsnet.ne.jp> 2004/09/14

[#3395] Re: [PATCH] dir.c --- Dir.chdir error handling — ts <decoux@...> 2004/09/14

>>>>> "H" == H Yamamoto <ocean@m2.ccsnet.ne.jp> writes:

[#3399] Re: [PATCH] dir.c --- Dir.chdir error handling — "H.Yamamoto" <ocean@...2.ccsnet.ne.jp> 2004/09/15

[#3403] Re: [PATCH] dir.c --- Dir.chdir error handling — ts <decoux@...> 2004/09/15

>>>>> "H" == H Yamamoto <ocean@m2.ccsnet.ne.jp> writes:

[#3404] Re: [PATCH] dir.c --- Dir.chdir error handling — Yukihiro Matsumoto <matz@...> 2004/09/15

Hi,

[#3405] Re: [PATCH] dir.c --- Dir.chdir error handling — ts <decoux@...> 2004/09/15

>>>>> "Y" == Yukihiro Matsumoto <matz@ruby-lang.org> writes:

[#3409] Re: [PATCH] dir.c --- Dir.chdir error handling — Yukihiro Matsumoto <matz@...> 2004/09/16

Hi,

[#3416] Re: [PATCH] dir.c --- Dir.chdir error handling — ts <decoux@...> 2004/09/16

>>>>> "Y" == Yukihiro Matsumoto <matz@ruby-lang.org> writes:

[#3303] URGENT: what's the bug reporting system now? — Dave Thomas <dave@...>

Hello!

14 messages 2004/08/25

YAML problem, possibly?

From: Hugh Sasse Staff Elec Eng <hgs@...>
Date: 2004-08-10 10:17:15 UTC
List: ruby-core #3269
I obtained a largish lump of shallow XML, succcessfully read it with
REXML, and then tried to YAML dump it.

The files I obtained were
http://prdownloads.sourceforge.net/annabot/AnnaAIML-.7.0.zip?download

which is AIML based so the maximum depth of the XML is
<aiml>
   <topic>
     <category>
       <template>
         <srai>
           <srai>
           </srai>
         </srai>
     </category>
   <topic>
<aiml>

though there may be many categories, as in file anna_brain/D.aiml .

The results I get are these:


E:\Downloads\AnnaAIML-.7.0\anna_brain>xml_to_yaml.rb
<aiml> ... </>
c:/ruby/lib/ruby/1.8/yaml/rubytypes.rb:287:in `is_complex_yaml?': stack level t
o deep (SystemStackError)
         from c:/ruby/lib/ruby/1.8/yaml/rubytypes.rb:300:in `to_yaml'
         from c:/ruby/lib/ruby/1.8/yaml/baseemitter.rb:177:in `map'
         from c:/ruby/lib/ruby/1.8/yaml/baseemitter.rb:172:in `each'
         from c:/ruby/lib/ruby/1.8/yaml/baseemitter.rb:172:in `map'
         from c:/ruby/lib/ruby/1.8/yaml/rubytypes.rb:25:in `to_yaml'
         from c:/ruby/lib/ruby/1.8/yaml/rubytypes.rb:24:in `call'
         from c:/ruby/lib/ruby/1.8/yaml.rb:335:in `quick_emit'
         from c:/ruby/lib/ruby/1.8/yaml/rubytypes.rb:24:in `to_yaml'
          ... 1120 levels...
         from c:/ruby/lib/ruby/1.8/yaml.rb:103:in `dump'
         from E:/Downloads/AnnaAIML-.7.0/anna_brain/xml_to_yaml.rb:10
         from E:/Downloads/AnnaAIML-.7.0/anna_brain/xml_to_yaml.rb:9:in `open'
         from E:/Downloads/AnnaAIML-.7.0/anna_brain/xml_to_yaml.rb:9

E:\Downloads\AnnaAIML-.7.0\anna_brain>ruby --version
ruby 1.8.2 (2004-07-29) [i386-mswin32]

E:\Downloads\AnnaAIML-.7.0\anna_brain>type xml_to_yaml.rb
require "rexml/document"
require "yaml"

doc = nil
open("I.aiml", "r") {|input|
   doc=REXML::Document.new(input)
}
p doc.root()
open("I.yaml","w") {|output|
     output.print YAML.dump(doc.root())
}


E:\Downloads\AnnaAIML-.7.0\anna_brain>`o


It is my belief that for an XML file so shallow, YAML should not
recurse so deeply when dumping the REXML document.  Is there a
reason why I am wrong? Should I be doing this differently?


         Hugh

In This Thread

Prev Next