before invoking IConnectionPoint::Release.
* test/win32ole/test_win32ole_event.rb, test/win32ole/err_in_callback.rb,
test/win32ole/test_err_in_callback.rb: Use ActiveX Data Object
Library instead of InternetExplorer.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20089 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
CP51932 on cygwin and mingw32. thanks to arton.
* test/win32ole/test_win32ole.rb (test_cp51932): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19767 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
according to Encoding.default_internal and
Encoding.default_external.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19717 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
to set value to the reference argument of event.
* test/win32ole/test_win32ole_event.rb: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18055 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
OLE object does not have default source interface.
* test/win32ole/test_win32ole_event.rb: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17960 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
find COCLASS when WIN32OLE object is not COCLASS.
* test/win32ole/test_win32ole_event.rb: ditto
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17956 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
converting String to VT_BSTR in OLE.
* test/win32ole/test_win32ole.rb : ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17620 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
GDBM#{each,each_pair,each_key,each_value}: Return an enumerator
if no block is given.
* ext/gdbm/gdbm.c (fgdbm_each_value, fgdbm_each_key,
fgdbm_each_pair): GDBM#{each,each_pair,each_key,each_value}:
Return an enumerator if no block is given.
* ext/openssl/ossl_config.c (ossl_config_each):
OpenSSL::Config#each: Return an enumerator if no block is given.
* ext/readline/readline.c (hist_each): Readline::HISTORY#each:
Return an enumerator if no block is given.
* ext/sdbm/init.c (fsdbm_each_value, fsdbm_each_key,
fsdbm_each_pair): SDBM#{each,each_pair,each_key,each_value}:
Return an enumerator if no block is given.
* ext/stringio/stringio.c (strio_each_byte, strio_each):
StringIO#{each,each_line,each_byte}: Return an enumerator if no
block is given.
* ext/stringio/stringio.c (Init_stringio): Add #lines and #bytes,
which are aliases to #each_line and #each_byte, respectively.
* ext/win32ole/win32ole.c (fole_each): WIN32OLE#each: Return an
enumerator if no block is given.
* ext/zlib/zlib.c (rb_gzreader_each_byte, rb_gzreader_each):
Zlib::GzipReader#{each,each_line,each_byte}: Return an
enumerator if no block is given.
* ext/zlib/zlib.c (Init_zlib): Add Zlib::GzipReader#lines and
#bytes, which are aliases to #each_line and #each_byte,
respectively.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16125 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
according to Encoding.default_external.
* test/win32ole/test_win32ole.rb: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15488 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
foletype_s_typelibs): refactoring.
* test/win32ole/test_win32ole_type.rb: add some test.
* ext/win32ole/win32ole.c (Init_win32ole): change method name
WIN32OLE_TYPELIB.ole_types from WIN32OLE_TYPELIB.ole_classes.
* test/win32ole/test_win32ole_typelib.rb: ditto.
* test/win32ole/test_folderitem2_invokeverb.rb: check create
shortcut string more strictly (This test is invoked in Japanese
Windows environment).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13690 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
ProgIDFromCLSID should be freed by CoTaskMemFree. Thanks, arton.
* test/win32ole/test_win32ole.rb (test_raise_message): set negative
compareMode value to raise WIN32OLERuntimeError.
* test/win32ole/test_win32ole_type.rb (test_implemented_ole_types):
support some environment which returns IShellDispatch5 instead
of IShellDispatch.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13296 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
fev_initialize): remove the connection ole_event_free and
EVENTSINK_Destructor.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13272 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
of RegQueryValueEx.
* ext/win32ole/win32ole.c (typelib_file_from_clsid): fix the bug
that the function always returns Qnil.
* test/win32ole/test_win32ole_type.rb (test_initialize): add some test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13241 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
init place of exception_error.
* inits.c: ditto.
* eval.c (Init_eval): set exception_error#throwed_state as TAG_FATAL.
[ruby-dev:31407]
* bootstraptest/test_exception.rb: add a test for above.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12930 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
a little bit supporting ActiveX control. [ruby-talk:241188]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12082 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
ole_val2ptr_variant, ole_val2olevariantdata, ole_variant2val,
): fix some bugs of WIN32OLE_VARIANT.new when variant type is
VT_ARRAY|VT_BSTR or VT_BYREF.
* ext/win32ole/win32ole.c (folevariant_s_array, folevariant_initialize):
WIN32OLE_VARIANT#[], WIN32OLE_VARIANT#[]=, WIN32OLE_VARIANT#value=
is defined as instance method of WIN32OLE_VARIANT.
* test/win32ole/test_win32ole_variant.rb: add some test for
VT_ARRAY, VT_BYREF variant type.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11959 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
WIN32OLE_VARIANT#value=, refactoring.
* test/win32ole/test_win32ole_variant.rb: add some test for
WIN32OLE_VARIANT.array, WIN32OLE_VARIANT#value=.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11834 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
WIN32OLE_VARIANT#new accepts nil when variant type is VT_ARRAY.
* test/win32ole/test_win32ole_variant.rb: ditto.
* ext/win32ole/win32ole.c: small refactoring.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11702 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
thanks to Mikael Pahmp.
* test/win32ole/test_win32ole.rb: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11690 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
ole_val_ary2variant_ary): fix WIN32OLE_VARIANT.new bug when
1st argument is empty array, and when 2nd argument is
VT_ARRAY|VT_BYREF.
* test/win32ole/test_win32ole_variant.rb: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11670 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
fix the bug of WIN32OLE_VARIANT.new when variant type is
VT_ARRAY.
* ext/win32ole/sample/excel1.rb: rewrite using WIN32OLE_VARIANT.
* test/win32ole/test_win32ole.rb: add some test.
* test/win32ole/test_win32ole_variant.rb: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11624 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
WIN32OLE_VARIANT#vartype.
* test/win32ole/test_win32ole.rb: add test for WIN32OLE.locale=,
WIN32OLE.locale.
* test/win32ole/test_win32ole_variant.rb: add test for
WIN32OLE_VARIANT#vartype.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11588 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
WIN32OLE_VARIANT.new check that 1st argument should T_ARRAY
when variant type is VT_ARRAY.
* test/win32ole/test_win32ole_variant.rb: add some test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11581 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
(RARRAY_LEN): defined for accessing array members.
(RARRAY_PTR): ditto.
* array.c: use RARRAY_LEN and RARRAY_PTR.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10833 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
add test/win32ole and remove some test script from ext/win32ole/tests.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10071 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
WIN32OLE_VARIANT.new().
* ext/win32ole/tests/testOLEVARIANT.rb: ditto.
* ext/win32ole/tests/testOLEPARAM.rb: test method name should not be
duplicated.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10032 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
(for constant reference).
* eval.c (rb_call0): use TMP_ALLOC() instead of allocating
a temporary array object.
* eval.c (eval): need not to protect $SAFE value.
[ruby-core:07177]
* error.c (Init_Exception): change NameError to direct subclass of
Exception so that default rescue do not handle it silently.
* struct.c (rb_struct_select): update RDoc description.
[ruby-core:7254]
* numeric.c (int_upto): return an enumerator if no block is
attached to the method.
* numeric.c (int_downto): ditto.
* numeric.c (int_dotimes): ditto.
* enum.c (enum_first): new method Enumerable#first to take first n
element from an enumerable.
* enum.c (enum_group_by): new method Enumerable#group_by that
groups enumerable values according to their block values.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9880 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
protect temporary context object. [ruby-dev:27979]
* ext/iconv/iconv.c (Init_iconv): rb_gc_register_address() should
be called before actual variable initialization.
[ruby-dev:27986]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9673 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
rb_exec_recursive() in eval.c.
* eval.c (rb_exec_recursive): new function.
* array.c (rb_ary_join): use rb_exec_recursive().
* array.c (rb_ary_inspect, rb_ary_hash): ditto.
* file.c (rb_file_join): ditto.
* hash.c (rb_hash_inspect, rb_hash_to_s, rb_hash_hash): ditto.
* io.c (rb_io_puts): ditto.
* object.c (rb_obj_inspect): ditto
* struct.c (rb_struct_inspect): ditto.
* lib/set.rb (SortedSet::setup): a hack to shut up warning.
[ruby-talk:132866]
* lib/time.rb (Time::strptime): add new function. inspired by
[ruby-talk:132815].
* lib/parsedate.rb (ParseDate::strptime): ditto.
* regparse.c: move st_*_strend() functions from st.c. fixed some
potential memory leaks.
* exception error messages updated. [ruby-core:04497]
* ext/socket/socket.c (Init_socket): add bunch of Socket
constants. Patch from Sam Roberts <sroberts@uniserve.com>.
[ruby-core:04409]
* array.c (rb_ary_s_create): no need for negative argc check.
[ruby-core:04463]
* array.c (rb_ary_unshift_m): ditto.
* lib/xmlrpc/parser.rb (XMLRPC::FaultException): make it subclass
of StandardError class, not Exception class. [ruby-core:04429]
* parse.y (fcall_gen): lvar(arg) will be evaluated as
lvar.call(arg) when lvar is a defined local variable. [new]
* object.c (rb_class_initialize): call inherited method before
calling initializing block.
* eval.c (rb_thread_start_1): initialize newly pushed frame.
* lib/open3.rb (Open3::popen3): $? should not be EXIT_FAILURE.
fixed: [ruby-core:04444]
* eval.c (is_defined): NODE_IASGN is an assignment.
* ext/readline/readline.c (Readline.readline): use rl_outstream
and rl_instream. [ruby-dev:25699]
* ext/etc/etc.c (Init_etc): sGroup needs HAVE_ST_GR_PASSWD check
[ruby-dev:25675]
* misc/ruby-mode.el: [ruby-core:04415]
* lib/rdoc/generators/html_generator.rb: [ruby-core:04412]
* lib/rdoc/generators/ri_generator.rb: ditto.
* struct.c (make_struct): fixed: [ruby-core:04402]
* ext/curses/curses.c (window_color_set): [ruby-core:04393]
* ext/socket/socket.c (Init_socket): SO_REUSEPORT added.
[ruby-talk:130092]
* object.c: [ruby-doc:818]
* parse.y (open_args): fix too verbose warnings for the space
before argument parentheses. [ruby-dev:25492]
* parse.y (parser_yylex): ditto.
* parse.y (parser_yylex): the first expression in the parentheses
should not be a command. [ruby-dev:25492]
* lib/irb/context.rb (IRB::Context::initialize): [ruby-core:04330]
* object.c (Init_Object): remove Object#type. [ruby-core:04335]
* st.c (st_foreach): report success/failure by return value.
[ruby-Bugs-1396]
* parse.y: forgot to initialize parser struct. [ruby-dev:25492]
* parse.y (parser_yylex): no tLABEL on EXPR_BEG.
[ruby-talk:127711]
* document updates - [ruby-core:04296], [ruby-core:04301],
[ruby-core:04302], [ruby-core:04307]
* dir.c (rb_push_glob): should work for NUL delimited patterns.
* dir.c (rb_glob2): should aware of offset in the pattern.
* string.c (rb_str_new4): should propagate taintedness.
* env.h: rename member names in struct FRAME; last_func -> callee,
orig_func -> this_func, last_class -> this_class.
* struct.c (rb_struct_set): use original method name, not callee
name, to retrieve member slot. [ruby-core:04268]
* time.c (time_strftime): protect from format modification from GC
finalizers.
* object.c (Init_Object): remove rb_obj_id_obsolete()
* eval.c (rb_mod_define_method): incomplete subclass check.
[ruby-dev:25464]
* gc.c (rb_data_object_alloc): klass may be NULL.
[ruby-list:40498]
* bignum.c (rb_big_rand): should return positive random number.
[ruby-dev:25401]
* bignum.c (rb_big_rand): do not use rb_big_modulo to generate
random bignums. [ruby-dev:25396]
* variable.c (rb_autoload): [ruby-dev:25373]
* eval.c (svalue_to_avalue): [ruby-dev:25366]
* string.c (rb_str_justify): [ruby-dev:25367]
* io.c (rb_f_select): [ruby-dev:25312]
* ext/socket/socket.c (sock_s_getservbyport): [ruby-talk:124072]
* struct.c (make_struct): [ruby-dev:25249]
* dir.c (dir_open_dir): new function. [ruby-dev:25242]
* io.c (rb_f_open): add type check for return value from to_open.
* lib/pstore.rb (PStore#transaction): Use the empty content when a
file is not found. [ruby-dev:24561]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8068 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* array.c (rb_ary_update): a[n,m]=nil no longer works as element
deletion.
* enum.c (enum_sort_by): protect continuation jump in.
[ruby-dev:24642]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7145 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
rb_io_fread() by freezing it temporarily. [ruby-dev:24479]
* dir.c (rb_push_glob): block call at once the end of method.
[ruby-dev:24487]
* ext/enumerator/enumerator.c (enum_each_slice): remove
rb_gc_force_recycle() to prevent potential SEGV.
[ruby-dev:24499]
* ext/zlib/zlib.c (zstream_expand_buffer): hide internal string
buffer by clearing klass. [ruby-dev:24510]
* ext/socket/socket.c (sock_s_getservbyaname): protocol string
might be altered. [ruby-dev:24503]
* string.c (rb_str_upto): check if return value from succ is a
string. [ruby-dev:24504]
* io.c (rb_io_popen): get mode string via rb_io_flags_mode() to
avoid mode string modification. [ruby-dev:24454]
* io.c (rb_io_getline_fast): should take delim as unsigned char to
distinguish EOF and '\377'. [ruby-dev:24460]
* io.c (rb_io_getline): add check for RS modification.
[ruby-dev:24461]
* enum.c (enum_sort_by): use qsort() directly instead using
rb_iterate(). [ruby-dev:24462]
* enum.c (enum_each_with_index): remove rb_gc_force_recycle() to
prevent access to recycled object (via continuation for
example). [ruby-dev:24463]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7071 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
(ruby-bugs:PR#1256)
* ext/win32ole/win32ole.c (set_argv): set real arguments to
WIN32OLE::ARGV. [ruby-list:39073]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5553 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
ext/openssl/ossl_pkey_rsa.c, ext/bigdecimal/bigdecimal.h: must
not use C++ or C99 style comment yet. (ruby-bugs:PR#1184)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4594 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
[ruby-dev:18577]
* ext/extmk.rb (extmake): expand $srcdir.
* ext/win32ole/extconf.rb: should not override $CFLAGS, but
append.
* lib/mkmf.rb (config_string): use given config hash.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2991 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32ole.c(WIN32OLE#ole_method_help): get all method information.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2699 b2dd03c8-39d4-4d8f-98ff-823fe69b080e