Matz & Others,

Thanks for the suggestions; I'll figure something out. I actually ran across
this problem using code generated by the Ruby module in SWIG1.3a5. As it
stands, SWIG generated a call to rb_scan_args() that looked like this:

    rb_scan_args(argc, argv, "212", ...);

for a C++ function that had 12 optional arguments. This compiles OK but
caused a runtime error when I actually tried to call the function from Ruby.
Someone who is more familar with the SWIG/Ruby code may want to get a fix in
for that.

Lyle

"Yukihiro Matsumoto" <matz / zetabits.com> wrote in message
news:977282817.520704.27308.nullmailer / ev.netlab.zetabits.com...
> Hi,
>
> In message "[ruby-talk:7721] Ruby enhancement request"
>     on 00/12/20, "Lyle Johnson" <ljohnson / resgen.com> writes:
>
> |Because the format string for rb_scan_args() only uses single digits to
> |determine the number of required and optional arguments this means that
you
> |can't have more than nine of either, right?
>
> You can't make them scanned by rb_scan_args().  But you can have:
>
>   * a method which takes arbtrary number of argument; defined by -1
>     or -2 for argument number.
>
>   * a method with fixed sized argument upto 15.
>
> So, check your arguments by yourself.  I'll add new function to check
> and parse argument list in the future, to enable keyword arguments.
> Stay tuned.
>
> matz.