Граф коммитов

132 Коммитов

Автор SHA1 Сообщение Дата
usa 11fbd724cc * ext/win32ole/win32ole.c: avoid warnings.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16130 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-22 00:58:51 +00:00
knu ffc456d0ed * ext/dbm/dbm.c (fdbm_each_value, fdbm_each_key, fdbm_each_pair):
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
2008-04-21 08:48:33 +00:00
usa fa222ced64 * ext/win32ole/win32ole.c (ole_init_cp): should return value.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15585 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-23 12:36:51 +00:00
suke 93efbc78bd * ext/win32ole/win32ole.c (ole_encoding2cp): remove US-ASCII
mapping.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15581 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-23 09:55:33 +00:00
suke 41ca14e8ac * ext/win32ole/win32ole.c (ole_init_cp): initialize WIN32OLE.codepage
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
2008-02-15 11:36:24 +00:00
naruse 40d8d38909 * ext/json/lib/json/pure/generator.rb,
ext/json/lib/json/pure/parser.rb, ext/openssl/lib/openssl/x509.rb,
ext/win32ole/sample/olegen.rb, lib/date/format.rb, lib/irb/context.rb,
lib/irb/workspace.rb, lib/net/http.rb, lib/net/imap.rb,
lib/rdoc/generator.rb, lib/rdoc/markup/to_html.rb,
lib/rdoc/markup/to_latex.rb, lib/rdoc/parsers/parse_c.rb,
lib/rdoc/ri/formatter.rb, lib/rexml/parsers/baseparser.rb,
lib/rexml/quickpath.rb, lib/rexml/text.rb, lib/rss/parser.rb,
lib/uri/common.rb, lib/uri/generic.rb, lib/webrick/httpresponse.rb,
lib/webrick/httpservlet/filehandler.rb, lib/yaml/baseemitter.rb,
lib/yaml/encoding.rb: performance tuning arround String#gsub.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15442 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-12 06:18:06 +00:00
usa 1e8e70a311 * ext/win32ole/win32ole.c (ole_cp2encoding): new function.
* ext/win32ole/win32ole.c (ole_wc2vstr, ole_variant2val, fole_missing):
	  set encoding to result.

	* ext/win32ole/win32ole.c (fole_s_set_code_page, Init_win32ole): set
	  default encoding.
	  [ruby-dev:33433]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15294 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-28 10:42:53 +00:00
suke 1b8aac3269 * ext/win32ole/win32ole.c (ole_set_safe_array): should not use
recursive calling.

* test/win32ole/test_win32ole_variant.rb: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15121 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-19 00:29:31 +00:00
akr 6cdef2dc7e * $Date$ keyword removed to avoid inclusion of locale dependent
string.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14912 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-06 15:49:38 +00:00
akr 4cf437519f * regerror.c, string.c, io.c, lib/getoptlong.rb, lib/net/imap.rb,
compile.c, sprintf.c, parse.y, ext/win32ole/win32ole.c,
  ext/tk/sample/demos-en/entry3.rb, ext/tk/lib/tcltk.rb,
  ext/openssl/ossl_bn.c, numeric.c, vm.c,
  benchmark/bm_so_meteor_contest.rb, bignum.c, ruby.c: don't "illegal"
  for non law violation context.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14377 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-21 02:31:11 +00:00
suke 24dcd39f19 ext/win32ole/win32ole.c (ole_invoke): bug fix. [ruby-talk:279100]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13952 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-17 15:04:55 +00:00
suke 31c764ff7f * ext/win32ole/win32ole.c (foletype_s_ole_classes,
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
2007-10-13 12:40:24 +00:00
suke b528261ad8 * ext/win32ole/win32ole.c (fev_unadvise): no needs to reset
event handlers.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13445 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-09-14 13:25:44 +00:00
suke 9ecd43fa98 * ext/win32ole/win32ole.c: add WIN32OLE_EVENT#unadvise.
* test/win32ole/test_win32ole_event.rb: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13341 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-09-04 11:48:53 +00:00
suke 0c5e6ab2bb * ext/win32ole/win32ole.c (ole_event_free): IConnectionPoint should be
released.

* ext/win32ole/win32ole.c (EVENTSINK_Destructor): ITypeInfo should be
  released.

* ext/win32ole/win32ole.c (fev_initialize): refactoring.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13329 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-09-01 11:11:51 +00:00
suke 41585e424b * ext/win32ole/win32ole.c (ole_type_progid): progid getted by
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
2007-08-28 10:23:31 +00:00
suke a1a618ead1 * ext/win32ole/win32ole.c (ole_type_progid): fix the bug.
[ruby-dev:31576]

* test/win32ole/test_win32ole_type.rb (test_initialize):
  remove duplicate assertions.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13286 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-27 11:38:29 +00:00
suke 71e6011d63 * ext/win32ole/win32ole.c (ole_wc2mb, reg_enum_key): allocate
buffer should be NULL terminated.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13277 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-25 21:57:46 +00:00
suke 890eb07370 * ext/win32ole/win32ole.c (ole_event_free, EVENTSINK_Destructor,
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
2007-08-25 14:01:08 +00:00
suke 32716144fd * ext/win32ole/win32ole.c (reg_get_value): use RegQueryValueEx instead
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
2007-08-23 11:14:03 +00:00
ko1 14c3aa52ae * proc.c (Init_Proc), eval.c (Init_eval), eval_intern.h: move
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
2007-08-14 10:53:53 +00:00
nobu f1622c195d * file.c (rb_file_s_rename): deleted code to get rid of a bug of
old Cygwin.

* file.c (rb_file_truncate): added prototype of GetLastError()
  on cygwin.  [ruby-dev:31239]

* include/ruby/intern.h (is_ruby_native_thread): prototype.

* missing/strftime.c (strftime): fix printf format and actual
  arguments.

* ext/Win32API/Win32API.c (Win32API_initialize): ditto.

* ext/tk/tcltklib.c (ip_finalize): ditto.

* ext/win32ole/win32ole.c (lcid_installed): ditto.

* ext/socket/getnameinfo.c: include stdio.h always.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12836 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-07-22 05:33:54 +00:00
nobu 2b592580bf * include/ruby: moved public headers.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12501 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-10 03:06:15 +00:00
suke d50f882cf0 * ext/win32ole/win32ole.c: add WIN32OLE#ole_activex_initialize,
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
2007-03-16 13:24:06 +00:00
suke c769454c0e * ext/win32ole/win32ole.c: add WIN32OLE_TYPELIB#library_name,
WIN32OLE_TYPELIB#visible?.

* test/win32ole/test_win32ole_typelib.rb: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12022 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-03-09 22:21:59 +00:00
suke e8783d008c * ext/win32ole/win32ole.c (get_ptr_of_variant, ole_set_safe_array,
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
2007-03-02 12:35:02 +00:00
suke 1fcf93350f * ext/win32ole/win32ole.c: add WIN32OLE_VARIANT.array,
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
2007-02-23 22:39:25 +00:00
suke 975ce3add3 * ext/win32ole/win32ole.c (installed_code_page_proc,
ole_variant2val): small refactoring.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11805 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-20 12:25:40 +00:00
suke fdf4aa982f * ext/win32ole/win32ole.c (ole_variant2val): VC++6 does not
support VT_I8, VT_UI8.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11741 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-14 13:57:59 +00:00
suke 1a4b93cf92 * ext/win32ole/win32ole.c (ole_variant2val): support VT_I8, VT_UI8.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11707 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-12 05:00:41 +00:00
suke 777ad4ee75 * ext/win32ole/win32ole.c (ole_ptrtype2val): ole_type, ole_type_detail
should not return "VARIANT,VARIANT".


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11705 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-11 13:45:57 +00:00
suke 70db47aadb * ext/win32ole/win32ole.c (ole_val2olevariantdata):
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
2007-02-11 09:53:10 +00:00
suke 7634900b4e * ext/win32ole/win32ole.c: add WIN32OLE#ole_query_interface.
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
2007-02-10 11:29:49 +00:00
suke 990ae267cd * ext/win32ole/win32ole.c (ole_set_safe_array, ole_variant2val,
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
2007-02-08 13:48:16 +00:00
suke d4b866914b * ext/win32ole/win32ole.c (ole_val2olevariantdata, ole_val2variant):
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
2007-02-03 05:41:03 +00:00
suke 883f34f777 * ext/win32ole/win32ole.c: add WIN32OLE.locale=, WIN32OLE.locale,
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
2007-01-29 12:41:50 +00:00
suke 7cc6cded59 * ext/win32ole/win32ole.c: refactoring.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11584 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-01-27 23:46:27 +00:00
suke 68daaab409 * ext/win32ole/win32ole.c (ole_val2olevariantdata): bug fix.
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
2007-01-27 09:46:34 +00:00
suke bb435c7a6c bug fix of WIN32OLE_VARIANT when variant type is VT_BYREF|VT_VARIANT.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11579 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-01-26 15:03:43 +00:00
suke 3b5dbc4b06 WIN32OLE.codepage= accepts installed codepage.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11550 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-01-20 12:12:36 +00:00
suke f700c1354f version 0.8.6.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11547 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-01-20 02:36:54 +00:00
suke e16e6a66ae modify WIN32OLERuntimeError message.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11546 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-01-20 02:28:49 +00:00
suke b44bd4c6d3 move all test from ext/win32ole/tests test/win32ole
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11545 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-01-20 00:37:35 +00:00
suke 59835fe865 move some test from ext/win32ole/tests to test/win32ole
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11544 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-01-19 15:17:56 +00:00
suke e538fe5703 add WIN32OLE_VARIANT::Empty, WIN32OLE_VARIANT::Null, WIN32OLE_VARIANT::Nothing.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11543 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-01-19 08:22:45 +00:00
suke 72cc74655f IN32OLE_VARIANT.new accepts nil as first argument for some VARIANT TYPE. fix memory leak.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11542 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-01-18 22:08:29 +00:00
suke d2907d42be fix memory leak of win32ole.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11529 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-01-13 14:40:54 +00:00
suke fe6e716424 ext/win32ole/doc removed
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11512 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-01-07 10:51:21 +00:00
suke b84ff5ccb3 add some test. update comment for rdoc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11507 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-01-07 08:56:04 +00:00
suke a782fa1268 add WIN32OLE::VARIANT::VT_NULL, WIN32OLE::VARIANT::VT_EMPTY.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11487 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-01-05 23:38:15 +00:00