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

2279 Коммитов

Автор SHA1 Сообщение Дата
suke f6f85ad683 * ext/win32ole/win32ole.c (ole_invoke): WIN32OLE#[] and WIN32OLE#[]=
accepts number argument.

* test/win32ole/test_win32ole.rb: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18882 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-27 14:43:23 +00:00
mame 4e573bf068 * ext/bigdecimal/bigdecimal.c (VpMult): fix double free.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18846 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-25 15:03:14 +00:00
akr 3721df734c * ext/pty/pty.c (pty_getpty): follow rb_io_t's path -> pathv change.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18785 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-23 01:49:56 +00:00
akr 895fd7ec5e * include/ruby/io.h (rb_io_t): remove path field and add pathv field.
(MakeOpenFile): initialize pathv as Qnil.

* gc.c: mark pathv field in T_FILE.

* io.c: follow the rb_io_t field change.

* file.c: ditto.

* ext/socket/socket.c: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18782 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-23 00:47:54 +00:00
akr cf26f818e4 * ext/openssl/ossl_x509name.c (ossl_x509name_initialize): store the
result of d2i_X509_NAME into DATA_PTR(self).


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18702 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-19 08:34:42 +00:00
knu d4b7cc796c * golf_prelude.rb, lib/set.rb (TC_Set#test_each),
test/readline/test_readline_history.rb (Readline#test_each__enumerator),
  test/ruby/test_array.rb (TestArray#test_collect),
  test/ruby/test_enumerator.rb (TestEnumerator#test_initialize):
  Enumerable::Enumerator is now called Enumerator.

* lib/rinda/tuplespace.rb (Rinda::TupleBag#initialize): Use
  enum_for instead of hardcoding Enumerable::Enumerator.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18571 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-13 08:03:30 +00:00
matz 5643c0d69a * ext/bigdecimal/bigdecimal.c (BigDecimalCmp): should not ignore
<=> comparison.   [ruby-dev:35732]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18533 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-12 09:47:49 +00:00
knu d04cc54add * ext/syslog/syslog.c (mSyslog_open): Use of Check_SafeStr() is
deprecated.
  (mSyslogConstants_LOG_MASK, mSyslogConstants_LOG_UPTO): Use
  NUM2INT() instead of FIX2INT() when the type of an given object
  is not determined.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18530 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-12 09:35:12 +00:00
nobu 3c1fca24e2 * ext/dl/cptr.c (rb_dlptr_s_to_ptr): fixed shadowing variable.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18510 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-12 05:15:18 +00:00
nobu 0bf6ed0fc8 * ext/socket/getaddrinfo.c (getaddrinfo): constified.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18508 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-12 05:08:51 +00:00
matz 199a95775b * ext/dl/cfunc.c (rb_dlcfunc_call): add taint check.
* ext/dl/dl.c (rb_dl_malloc): add rb_secure(2).

* ext/dl/dl.c (rb_dl_realloc): ditto.

* ext/dl/dl.c (rb_dl_free): ditto.

* ext/dl/dl.c (rb_dl_ptr2value): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18496 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-11 11:33:44 +00:00
kouji aa2a222f9c * ext/readline/README.ja: added API document for
Readline.vi_editing_mode? and Readline.emacs_editing_mode?.

* ext/readline/extconf.rb: checked rl_editing_mode variable in
  Readline library.

* ext/readline/readline.c (readline_s_emacs_editing_mode_p): added
  Readline.emacs_editing_mode? method.
  (readline_s_vi_editing_mode_p): added Readline.vi_editing_mode?
  method.
  (Init_readline): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18491 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-11 08:31:45 +00:00
nobu a64266a728 * configure.in (rb_cv_missing__dtos18, rb_cv_missing_fconvert),
ext/digest/md5/md5.c, ext/openssl/ossl.c (main),
  ext/socket/extconf.rb (ipv6, wide-getaddrinfo): main should be int.

* main.c (main), win32/winmain.c, wince/wincemain.c (WinMain): envp is
  no longer used so long time.  based on a patch from Peter Bowen at
  [ruby-core:18208]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18459 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-09 23:15:08 +00:00
nobu 750cb61e65 * stable/ext/socket/socket.c (NI_MAXHOST, NI_MAXSERV): fixed invalid
preprocessor directives.  a patch from Peter Bowen at
  [ruby-core:18211].


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18450 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-09 04:35:13 +00:00
kouji fedc035ab8 * ext/.document: added readline/readline.c.
* ext/readline/readline.c: changed Copyright. added RDoc.

* ext/readline/README.ja: fixed typo.

* ext/readline/README: contents was moved RDoc.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18420 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-07 15:06:36 +00:00
kouji 05373c4469 * ext/readline/README.ja: updated API document for Readline module.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18418 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-07 13:58:04 +00:00
usa c73a203040 * ext/socket/getaddrinfo.c (gai_strerror): ignore only on Haiku.
a patch from <znz at mbf.nifty.com>, [ruby-dev:35796].



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18408 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-07 04:14:25 +00:00
naruse 48e21d2051 * eval_intern.h: Add support to Haiku. see [ruby-core:18110]
* include/ruby/defines.h: ditto.

* configure.in: ditto.

* thread_pthread.c: ditto.

* io.c: ditto.

* lib/mkmf.rb: ditto.

* ext/socket/getaddrinfo.c: ditto.

* ext/socket/extconf.rb: ditto.

* ext/socket/socket.c: ditto.

* ext/socket/addrinfo.h: ditto.

* ext/socket/getnameinfo.c: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18402 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-06 20:52:44 +00:00
suke e231d67ee1 * ext/win32ole/win32ole.c (hash2named_arg): refactoring.
* ext/win32ole/win32ole.c (ole_invoke, fole_respond_to, ev_on_event,
  fev_off_event): accepts Symbol argument.

* test/win32ole/test_win32ole.rb: ditto.

* test/win32ole/test_win32ole_event.rb: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18324 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-03 10:43:44 +00:00
kouji 7eb66d1c7b * ext/readline/extconf.rb: checked to have clear_history in
readline library.
* ext/readline/readline.c (hist_get, hist_each, Init_readline): 
  The offset specified for the argument of history_get() might be
  different in GNU Readline and libedit. If use libedit, it was
  corrected that the computational method of the offset specified
  for the argument of history_get() when the Readline module was
  initialized was decided.
  (hist_get, hist_set): If use libedit, accesses first an input
  content in history when specifies the negative offset for the
  argument of history_get() or replace_history_entry(). Then
  checks the offset is negative in ruby.
  (rb_remove_history): When compiling, it corrects it to warning
  when libedit is used.
  (hist_clear, Init_readline): added Readline::HISTORY.clear
  method. [ruby-dev:35551]
* test/readline/test_readline_history.rb: added unit test for
  Readline::HISTORY.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18313 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-01 15:04:37 +00:00
mame e4416992d8 * ext/syck/syck.c (syck_free_parser): fix memory leak by
YAML::Syck.compile.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18297 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-31 15:44:51 +00:00
mame 9de7bcff88 * ext/bigdecimal/bigdecimal.c (VpMult): prevent memory leak.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18296 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-31 13:18:10 +00:00
nobu 42a483d392 * ext/syck/syck.h (ASSERT): fix typo at r18176.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18285 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-31 02:31:33 +00:00
nobu 18caf715c9 * ext/syck/rubyext.c (rb_syck_compile): expression in ASSERT() has no
effect unless debug mode.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18284 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-31 02:30:46 +00:00
nobu 8a6c699282 * iseq.c (ruby_iseq_disasm_insn): suppress warnings on platforms which
int size differs from pointer size.

* ext/openssl/ossl_asn1.c (ossl_asn1_get_asn1type): ditto

* ext/syck/rubyext.c (rb_syck_err_handler),
  (syck_default_error_handler): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18283 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-31 01:51:44 +00:00
mame 368d944621 * ext/syck/rubyext.c (rb_syck_compile): remove meaningless branch
that misleads into thinking that the variable sav may be
  uninitialized.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18282 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-30 17:22:16 +00:00
mame d07b084239 * ext/bigdecimal/bigdecimal.c (VpIsRoundMode): fix tautology
condition.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18275 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-30 16:09:54 +00:00
mame 995e44e050 * ext/bigdecimal/bigdecimal.c (Init_bigdecimal): fix typo.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18259 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-29 12:38:33 +00:00
suke 1f9fce063f add sample script using WIN32OLE_EVENT#handler=
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18226 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-26 12:49:25 +00:00
suke 2e400ad1b8 * ext/win32ole/win32ole.c (Init_win32ole): add
WIN32OLE_EVENT#handler=, WIN32OLE_EVENT#handler

* test/win32ole/test_win32ole_event.rb: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18225 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-26 12:27:57 +00:00
suke 6997482140 * ext/win32ole/win32ole.c (add_event_call_back): remove unused
variable.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18223 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-25 22:48:25 +00:00
suke 148d575264 * ext/win32ole/win32ole.c (ole_invoke, add_event_callback,
rescue_callback): refactoring.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18216 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-25 12:13:57 +00:00
suke 4aec73e1ed * ext/win32ole/win32ole.c (Init_win32ole): add
WIN32OLE_EVENT#off_event.

* test/win32ole/test_win32ole_event.rb: ditto.
	
* test/win32ole/test_win32ole_event.rb: some refactoring.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18214 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-25 11:49:28 +00:00
nobu 20796c9000 * ext/nkf/nkf-utf8/nkf.c (struct input_code.name, input_codename):
constified.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18204 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-25 05:48:32 +00:00
naruse b7464f8513 * ext/nkf/nkf.c (rb_nkf_convert): output of mime encode is US-ASCII.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18201 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-24 19:14:47 +00:00
nobu 7481463bf6 * ext/win32ole/win32ole.c: got rid of improper casts.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18192 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-23 22:01:36 +00:00
nobu ed9a65c4f6 * ext/tk/{stubs,tcltklib}.c, ext/tk/tkutil/tkutil.c: fix warnings
about constness and signedness.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18188 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-23 09:27:49 +00:00
nobu 7b9b1f45d3 * ext/openssl/openssl_missing.h (d2i_of_void): define for older
versions.  [ruby-dev:35637]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18181 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-23 08:04:25 +00:00
nobu 391f0a726f * ext/curses/extconf.rb: use try_static_assert.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18180 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-23 04:53:39 +00:00
nobu d5d402ebf5 * ext/syck: suppress warnings more.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18177 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-22 21:25:49 +00:00
nobu 9049de7875 * ext/syck: suppress warnings more.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18176 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-22 21:12:00 +00:00
nobu e35550c3e7 * ext/nkf/nkf-utf8/nkf.c (struct input_code.name, input_codename):
constified.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18171 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-22 18:19:34 +00:00
nobu 5c0dcf52fd * ext/syck: suppress warnings.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18170 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-22 18:02:12 +00:00
nobu 6c0f540298 * ext/openssl: suppress warnings.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18168 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-22 15:34:23 +00:00
mame d56885b43d * ext/syck/rubyext.c, ext/syck/yaml2byte.c, ext/syck/emitter.c,
ext/syck/syck.c, ext/syck/handler.c, ext/syck/syck.h: suppress GCC
  warning.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18167 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-22 14:04:10 +00:00
mame 7771f6c0ee * ext/bigdecimal/bigdecimal.c (BigDecimalCmp): BigDecimal#<=> should
return nil if an argument can't be coerced into BigDecimal.

* ext/bigdecimal/bigdecimal.h, ext/bigdecimal/bigdecimal.c
  (VpIsNegDoubleZero, VpItoV): comment out unused functions.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18162 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-22 11:43:38 +00:00
usa e4d911fa98 * ext/socket/socket.c (connect_blocking, socks_connect_blocking,
ruby_connect): cast.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18155 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-22 07:09:34 +00:00
suke 4e554319dd * ext/win32ole/win32ole.c (EVENTSINK_Invoke): use rb_protect
instead of rb_rescue2. [ruby-dev:35595]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18135 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-20 07:05:20 +00:00
suke a9b125cf20 * ext/win32ole/win32ole.c (EVENTSINK_Invoke): little refactoring.
* ext/win32ole/win32ole.c (EVENTSINK_GetIDsOfNames): return
  ITypeInfo::GetIDsOfNames().



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18133 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-19 16:28:23 +00:00
suke 535f17f30b * ext/win32ole/win32ole.c (EVENTSINK_Invoke): little refactoring.
* ext/win32ole/win32ole.c: add document of inspect methods.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18132 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-19 00:35:38 +00:00