From: Fredrik Jagenheim Date: 2004-07-25T09:13:45+09:00 Subject: [NUBY] Iteration in extensions I can't get this simple thing to work. My extension uses two functions, 'add_value' and 'add_values'. 'add_value' takes one value and 'add_values' takes an array of values. The idea is to have add_values to call add_value for each of the values. Simple enough... static VALUE add_value(VALUE self, VALUE val) { # Code that works } static VALUE add_values(VALUE self, VALUE vals) { rb_iterate(rb_each, vals, add_value, 0); } 'add_value' works fine, but when I call 'add_values', I get this: TypeError: wrong argument type String (expected Data) I guess I just don't understand how the rb_iterate is supposed to work... Any pointers would be appreciated. //F