次のようにすると core を吐きます。

% ./ruby -ropenssl -e '
s = OpenSSL::Netscape::SPKI.new
str = Object.new
class << str; self end.send(:define_method, :to_str) {
  s.instance_eval { initialize "MBkwDzAIMAMGAQADAQAWA2FhYTADBgEAAwEA" }
  "aaa"
}
s.challenge = str
p s
'
-e:8: [BUG] Segmentation fault
ruby 1.9.0 (2004-12-27) [i686-linux]

zsh: abort (core dumped)  ./ruby -ropenssl -e 
% gdb ruby core 
GNU gdb 6.1-debian
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-linux"...Using host libthread_db library "/lib/libthread_db.so.1".

Core was generated by `./ruby -ropenssl -e 
s = OpenSSL::Netscape::SPKI.new
str = Object.new
class <<'.
Program terminated with signal 6, Aborted.
Reading symbols from /lib/libdl.so.2...done.
Loaded symbols for /lib/libdl.so.2
Reading symbols from /lib/libcrypt.so.1...done.
Loaded symbols for /lib/libcrypt.so.1
Reading symbols from /lib/libm.so.6...done.
Loaded symbols for /lib/libm.so.6
Reading symbols from /lib/libc.so.6...done.
Loaded symbols for /lib/libc.so.6
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
Reading symbols from /home/akr/ruby/head-ruby/lib/ruby/1.9/i686-linux/openssl.so...done.
Loaded symbols for /home/akr/ruby/head-ruby/lib/ruby/1.9/i686-linux/openssl.so
Reading symbols from /usr/lib/i686/cmov/libssl.so.0.9.7...done.
Loaded symbols for /usr/lib/i686/cmov/libssl.so.0.9.7
Reading symbols from /usr/lib/i686/cmov/libcrypto.so.0.9.7...done.
Loaded symbols for /usr/lib/i686/cmov/libcrypto.so.0.9.7
#0  0x4009e6b1 in kill () from /lib/libc.so.6
(gdb) bt
#0  0x4009e6b1 in kill () from /lib/libc.so.6
#1  0x4009e435 in raise () from /lib/libc.so.6
#2  0x4009f978 in abort () from /lib/libc.so.6
#3  0x080d59b6 in rb_bug (fmt=0x0) at error.c:214
#4  0x080b2972 in sigsegv (sig=11) at signal.c:446
#5  <signal handler called>
#6  0x402e20c2 in ASN1_STRING_set () from /usr/lib/i686/cmov/libcrypto.so.0.9.7
#7  0x40248e18 in ?? () from /usr/lib/i686/cmov/libcrypto.so.0.9.7
#8  0x4020d820 in __JCR_LIST__ () from /home/akr/ruby/head-ruby/lib/ruby/1.9/i686-linux/openssl.so
#9  0x08191270 in ?? ()
#10 0x401f2750 in ossl_spki_get_challenge () at ossl_ns_spki.c:146
#11 0x4000bbe0 in _dl_map_object_deps () from /lib/ld-linux.so.2
#12 0x401f27ab in ossl_spki_set_challenge (self=3, str=1075500396) at ossl_ns_spki.c:160
#13 0x0806ae12 in call_cfunc (func=0x11, recv=1075500616, len=1075500396, argc=1075500816, argv=0xbffff0c8) at eval.c:5415
#14 0x0805eab2 in rb_call0 (klass=1075601876, recv=1075500616, id=10988, oid=17, argc=1, argv=0xbffff0c8, body=0x401c6008, 
    nosuper=0) at eval.c:5559
#15 0x0805ed78 in rb_call (klass=1075601876, recv=1075500616, mid=10988, argc=1, argv=0xbffff0c8, scope=0) at eval.c:5781
#16 0x0805b328 in rb_eval (self=1075673536, n=0x11) at ruby.h:635
#17 0x08055e6d in ruby_exec_internal () at eval.c:1470
#18 0x08055e86 in ruby_exec () at eval.c:1488
#19 0x08055ed0 in ruby_run () at eval.c:1505
#20 0x08053ed5 in main (argc=17, argv=0x11, envp=0xbffff8a8) at main.c:38
(gdb) 
-- 
[田中 哲][たなか あきら][Tanaka Akira]