From: Daniel Berger Date: 2005-12-14T07:50:54+09:00 Subject: Re: ruby-ldap: uninitialized constant LDAP::LDAP_CONTROL_PAGEDRESULTS James Hughes wrote: > On 12/13/05, Daniel Berger wrote: > >>James Hughes wrote: >> >> >>>I need to use this control, but I can't figure out why this is >>>happening. This constant is mentioned in ldap.c: >>> >>>#ifdef LDAP_CONTROL_PAGEDRESULTS >>> rb_define_const (rb_mLDAP, "LDAP_CONTROL_PAGEDRESULTS", >>> rb_str_new2 (LDAP_CONTROL_PAGEDRESULTS)); >>>#endif >>> >> >>That's a bug. Replace rb_str_new2 with INT2NUM. > > > Done, rebuilt the .so, no joy. Whoops, that's not a bug. It's a string after all. Change that back to rb_str_new2. rb(main):001:0> require "ldap" => true irb(main):002:0> LDAP::LDAP_CONTROL_PAGEDRESULTS => "1.2.840.113556.1.4.319" Perhaps it's just not defined with your particular version of ldap? Regards, Dan