[#1816] Ruby 1.5.3 under Tru64 (Alpha)? — Clemens Hintze <clemens.hintze@...>

Hi all,

17 messages 2000/03/14

[#1989] English Ruby/Gtk Tutorial? — schneik@...

18 messages 2000/03/17

[#2241] setter() for local variables — ts <decoux@...>

18 messages 2000/03/29

[ruby-talk:01874] object creation

From: Andrew Hunt <Andy@...>
Date: 2000-03-16 02:17:00 UTC
List: ruby-talk #1874
Hi all,

Just a quick question -- is the following sequence the correct
way to create a Ruby object from C?

  NEWOBJ(obj, c-type)  -- allocate memory for an object
  OBJSETUP(obj, class, T_class); -- set appropriate flags
  rb_obj_call_init(obj, argc, argv); -- call initialize

There was some discussion a while back on whether *every* class called 
initialize or not, how did that end up?  It would apper from the
current code that most of the built-in classes *do not* call
an initialize method.

Many thanks!

/\ndy

--
Andrew Hunt, The Pragmatic Programmers, LLC.
Innovative Object-Oriented Software Development
web:   http://www.pragmaticprogrammer.com   email: andy@pragmaticprogrammer.com
--
Our New Book: "The Pragmatic Programmer" Published by Addison-Wesley Oct 1999
              (see www.pragmaticprogrammer.com/ppbook)
--

In This Thread

Prev Next