Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.ruby > #6930

Re: I need help understanding some code..

From Robert Klemme <shortcutter@googlemail.com>
Newsgroups comp.lang.ruby
Subject Re: I need help understanding some code..
Date 2014-03-07 08:43 +0100
Message-ID <bntbksFmusvU1@mid.individual.net> (permalink)
References <201e9c0c-0723-49b1-8021-a72d7caf0987@googlegroups.com> <9244258a-8dc0-42da-be4f-6c08eae80484@googlegroups.com>

Show all headers | View raw


On 05.03.2014 22:07, Thomas Foster wrote:

> After reading a few posts around the google machine..I think I found
> the issue was with the inspect function and the existing inspect
> method implemented in ruby...When I changed the def inspect line to
> def inspects..the issue was resolved..I don't know what else it broke
> :) but I am able to access my objects in VSphere 5.1.

But that is a different method - #inspect is invoked at specific places 
(e.g. from method "p") and if you change the name that won't happen.

I do not know the data structure that you are printing there but if you 
have circular dependencies that might explain the issue you are seeing. 
  The error you reported was really what happens on recursion which is 
not terminated before it runs out of stack space:

irb(main):011:0> def f;f; end
=> nil
irb(main):012:0> f
SystemStackError: stack level too deep
	from /usr/lib/ruby/1.9.1/irb/workspace.rb:80

Cheers

	robert

Back to comp.lang.ruby | Previous | NextPrevious in thread | Find similar


Thread

I need help understanding some code.. Thomas Foster <thomas.foster80@gmail.com> - 2014-03-05 11:55 -0800
  Re: I need help understanding some code.. Thomas Foster <thomas.foster80@gmail.com> - 2014-03-05 11:56 -0800
  Re: I need help understanding some code.. Thomas Foster <thomas.foster80@gmail.com> - 2014-03-05 13:07 -0800
    Re: I need help understanding some code.. Robert Klemme <shortcutter@googlemail.com> - 2014-03-07 08:43 +0100

csiph-web