Ruby.h missing functions

I am trying to write my first Ruby extension.
It is the first example in “Programming Ruby” by David Thomas and Andrew Hunt.
The example is on page 173.
The “C” code calls the function
rb_arr_new()

This function is not in my ruby.h file.
I download ruby version
1.6.6 2001-12-26 [i586-mswin32]

I get a linker error when compiling stating that
_rb_arr_new is an unresolved external symbol.

Is there something wrong with my distribution?
Where is the header declaration for rb_arr_new defined.
Where is rb_arr_new defined (libruby.lib? mswin32-ruby16.dll?)

Are you thinking of rb_ary_new?

···

On Thu, 05 Sep 2002 20:20:33 -0400, MetalOne wrote:

I am trying to write my first Ruby extension. It is the first example in
“Programming Ruby” by David Thomas and Andrew Hunt. The example is on
page 173.
The “C” code calls the function
rb_arr_new()

Hmm, is this a bug in the book? It should be rb_ary_new().

···

Am 2002-09-06 09:29:30 +0900 schrieb MetalOne:

The “C” code calls the function
rb_arr_new()


You had to live --did live, from habit that became instinct-- in the
assumption that every sound you made was overheard, and, except in darkness,
every movement scrutinized.
– George Orwell, “1984”, 1948

Hi,

···

In message “ruby.h missing functions” on 02/09/06, MetalOne jcb@iteris.com writes:

This function is not in my ruby.h file.

Some funtions are in “intern.h”.

						matz.

Florian Frank flori@nixe.ping.de wrote in message news:20020906011338.GB25252@nixe.eavesdrop.ping.de

···

Am 2002-09-06 09:29:30 +0900 schrieb MetalOne:

The “C” code calls the function
rb_arr_new()

Hmm, is this a bug in the book? It should be rb_ary_new().

My mistake. It is rb_ary_new() and the book had it right.
The book had the assignment
arr = rb_ary_new().

It now compiles correctly.

Thanks for everyone’s help.