On Thu, 9 Nov 2000, ts wrote:

> >>>>> "H" == Hugh Sasse Staff Elec Eng <hgs / dmu.ac.uk> writes:
> 
> H> But how does it work?  Does it use 'type' to find this, or is there
> H> some language feature I should be aware of that I'm not.
> 
	[...]
>     else if (argc == 2) {
> 	if (FIXNUM_P(a1)) limit = FIX2INT(a1);
> 	else port = a1;
>     }
> 

sort of using type then. Ok. thanks.

> #define FIXNUM_P(f) (((long)(f))&FIXNUM_FLAG)
> #define FIXNUM_FLAG 0x01
> 
[on limit argument default value]
> H> Hmmm, The Book says its 100.

page 432, about half way down. pp272-4 doesn't really talk about
depth much; if -1 dumps everthing, then maybe there's no need.

> 
>  marshal.c (ruby-1.6.1)
> 
> [..]
>     if (limit == 0) {
> 	rb_raise(rb_eArgError, "exceed depth limit");
>     }
> [...]
>     else {
> 	long num;
> 
> 	limit--;
> [...]
> static VALUE
> marshal_dump(argc, argv)
>     int argc;
>     VALUE* argv;
> {
>     VALUE obj, port, a1, a2;
>     int limit = -1;
> [...]
>  

OK. I'll CC this to rubybook, so they have the info where they want it.
> 
> 
> Guy Decoux
> 
> 
	Thank you.
	Hugh
	hgs / dmu.ac.uk