aboutsummaryrefslogtreecommitdiffstats
path: root/ext
Commit message (Collapse)AuthorAgeFilesLines
* * ext/dl/{closure,function}.c: removed C99 features and warnings.nobu2010-02-032-147/+154
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26548 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Wed Feb 3 10:12:09 2010 Aaron Patterson <tenderlove@ruby-lang.org>tenderlove2010-02-0316-372/+619
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ext/dl/function.c: DL::Function now uses libffi * ext/dl/cfunc.c (rb_dl_set_last_error): set to non static so errors can be exposed. * ext/dl/closure.c: DL::Closure will now be used in place of ext/dl/callback/*. * ext/dl/dl.c: legacy callbacks removed in favor of libffi * ext/dl/dl_converions.(c,h): used for converting ruby types to FFI types. * ext/dl/callback/*: replaced by libffi callbacks. * ext/dl/lib/dl/callback.rb: Converting internal callbacks to use DL::Closure * ext/dl/lib/dl/closure.rb: Ruby parts of the new DL::Closure object * ext/dl/lib/dl/import.rb: More conversion to use DL::Closure object * ext/dl/lib/dl/value.rb (ruby2ffi): adding private method for DL::CPtr to ffi value conversion. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26545 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/socket.c: turn on do_not_reverse_lookup by default,nobu2010-02-021-1/+1
| | | | | | | | which has been reverted in r9880 probably unintentionally, according to matz. [ruby-core:24530] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26541 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/tk/tkutil/tkutil.c: fix SEGV on TkUtil::CallbackSubst._setup_subst_table.nagai2010-01-314-16/+38
| | | | | | | | | | | * ext/tk/lib/tk.rb: [ruby1.9] fix freeze at exit. * ext/tk/lib/tk.rb: [POTENTIAL INCOMPATIBLE] return NoMethodError for TkWindow#to_ary and to_str. * ext/tk/lib/tkextlib/tcllib/plotchart.rb: wrong arguments. * ext/tk/sampel/tkballoonhelp.rb: fail to support TkEntry widgets. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26530 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* update rdoc.akr2010-01-311-16/+14
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26521 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* rdoc update.akr2010-01-311-2/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26520 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* update rdoc.akr2010-01-311-1/+27
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26519 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/bigdecimal/bigdecimal.c (BigDecimal_to_i): update RDoc tomatz2010-01-281-26/+19
| | | | | | | | | | | denote that #to_i raises FloatDomainError for Inf and NaN. * ext/bigdecimal/bigdecimal.c (BigDecimal_to_i): fast #to_i using BigDecimal_split(). * bignum.c (conv_digit): use faster ISDIGIT() assuming ASCII. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26461 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/bigdecimal/bigdecimal.c (BigDecimal_DoDivmod, BigDecimal_mod,mame2010-01-261-16/+18
| | | | | | | BigDecimal_divmod, BigDecimal_div2): BigDecimal#% and #div returned an array itself that was returned by #divmod. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26434 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/bigdecimal/bigdecimal.c (VpCtoV): do not raise infinitymame2010-01-261-2/+4
| | | | | | exception for BigDecimal("0E200000000000"). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26432 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/zlib/zlib.c (rb_gzfile_s_wrap): add rdoc. [Bug #2656]naruse2010-01-261-2/+4
| | | | | | patched by Hugh Sasse [ruby-core:27692] [ruby-core:27852] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26429 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/bigdecimal/bigdecimal.c (VpCtoV): BigDecimal("0E200000000000")mame2010-01-261-7/+14
| | | | | | | | was Infinity, not 0. * test/bigdecimal/test_bigdecimal.rb: add a test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26428 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/extconf.rb: suppress a warning.akr2010-01-262-9/+9
| | | | | | | | * ext/extmk.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26426 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/zlib/zlib.c (rb_gzfile_s_wrap): add rdoc.naruse2010-01-262-920/+8
| | | | | | | | patched by Hugh Sasse [ruby-core:27692] * ext/zlib/doc/zlib.rd: removed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26421 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/strscan/strscan.c: fix rdoc. (length -> bytesize)naruse2010-01-261-3/+3
| | | | | | reported by Kornelius Kalnbach. see [ruby-core:27792] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26420 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/pty/pty.c (pty_check): needs WNOHANG to poll, return $?, andnobu2010-01-251-3/+3
| | | | | | | call raise_from_check() with pid_t. [ruby-dev:40141] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26402 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/win32ole/win32ole.c: add WIN32OLE.ole_initialize,suke2010-01-232-1/+65
| | | | | | | | | | | WIN32OLE.ole_uninitialize to use in win32ole.rb. You must not use thease methods. * ext/win32ole/lib/win32ole.rb: add win32ole.rb re-define Thread#initialize (fix ruby-core:27634) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26383 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * Makefile.in (clean-ext): allow glob patterns.nobu2010-01-191-21/+19
| | | | | | | * ext/extmk.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26355 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/zlib/{extconf.rb, zlib.c): crc32_combine and adler32_combine isusa2010-01-192-0/+11
| | | | | | | supported on Zlib 1.2.2.1, so check them for old zlib. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26353 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/zlib/zlib.c: added Zlib.crc32_combine and Zlib.adler32_combinetenderlove2010-01-191-0/+32
| | | | | | * test/zlib/test_zlib.rb: corresponding tests [ruby-core:27551] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26352 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/digest/digest.c (rb_digest_instance_hexdigest_bang): Fixknu2010-01-172-2/+28
| | | | | | | | | | | rdoc. * ext/digest/lib/digest.rb (Digest::Class.base64digest) (Digest::Instance#base64digest{,!}): New methods. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26339 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/digest/digest.c (rb_digest_instance_digest)knu2010-01-171-8/+2
| | | | | | | | | (rb_digest_instance_hexdigest): Save a method call of reset() for a disposable clone. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26336 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/iconv/iconv.c (rb_str_derive): use long.nobu2010-01-171-3/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26333 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/iconv/iconv.c (iconv_convert): suppress a warning.nobu2010-01-172-1/+6
| | | | | | | * lib/mkmf.rb (check_signedness): new method. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26332 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/readline/readline.c (readline_readline): check if instreamnobu2010-01-121-1/+3
| | | | | | | | | | is closed instead of fd 0. * ext/readline/readline.c (Init_readline): use STDIN for input. http://d.hatena.ne.jp/codnote/20100111/1263174134 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26300 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* removes the dtrace support. reverts r26239, r26238 and r26235.yugui2010-01-052-50/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26243 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * trace.h: new file. wraps tracing mechanisms.yugui2010-01-032-0/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * defs/dtrace.d: new file. defined a dtrace provider "ruby". * include/ruby/ruby.h (LIKELY): moved from vm.c. (UNLIKELY): ditto. (OBJSETUP): probe "object-create". (RUBY_EVENT_RESCUE): new event. * vm_exec.c (DEBUG_ENTER_INSN): embeded a probe insn-entry into it. (DEBUG_END_INSN): insn-return. * vm.c (LIKELY): moved into ruby.h. (UNLIKELY): ditto. (Init_BareVM): embeded a probe "raise" into it. * variable.c (rb_class2name_without_alloc): new utility function. * tool/rbinstall.rb (install?(:ext, :arch, :'ext-arch')): installs dtrace.d if necessary. * thread_pthread.c (add_signal_thread_list): probe "raise". (rb_thread_create_timer_thread): ditto. * thread.c (rb_thread_schedule_rec): probes "thread-enter" and "thread-leave", (thread_start_func_2): ditto. (thread_cleanup_func): probe "thread-term" * lib/mkmf.rb: supports dtrace postprocessor on making an extension. * iseq.c (rb_vm_insn_name): new utility function. (rb_vm_insn_len): ditto. * insns.def (hook): probes "method-etnry", "method-return", "line", and "rescue". * compile.c (iseq_compile_each): adds a trace op for "rescue" probe. * gc.c (garbage_collect): probes "gc-begin" and "gc-end". (obj_free): probe "object-free" (garbage_collect_with_gvl): probe "raise" (negative_size_allocation_error): ditto. (rb_memerror): ditto. * eval.c (rb_rescue2): probe "rescue" (rb_longjmp): probe "raise" * ext/probe/probe.c: new extension for application defined probes. * ext/probe/extconf.rb: ditto. * configure.in (--with-tracing-model): new option to choose a tracing mechanism. (DTRACE): new substitution. name of dtrace(1). (RUBY_TRACING_MODEL): new substitution. (DTRACE_OBJ): ditto. (MINIDTRACE_OBJ): ditto. (GOLFDTRACE_OBJ): ditto. (LIBRUBY_DTRACE_OBJ): ditto. (RUBY_DTRACE_POSTPROCESS): new macro. checks whether the dtrace on the system needs postprocessing. (RUBY_DTRACE_BSD_BROKEN): new macro. checks whether the dtrace supports USDT. * Makefile.in: (DTRACE): new variable. name of dtrace(1). (TRACING_MODEL): new variable. name of the chosen tracing mechanism. (DTRACE_OBJ): same as the one in configure.in. (MINIDTRACE_OBJ): ditto. (GOLFDTRACE_OBJ): ditto. (LIBRUBY_DTRACE_OBJ): ditto. (CPPOUTFILE): new substitution. necessary for generating dtrace.d (trace_none.h): new target for TRACING_MODEL=none (RUBY_H_INCLUDES): appended a header for tracing. (distclean-local): also removes preprocessed version of dtrace.d ($(LIBRUBY_A)): needs $(LIBRUBY_DTRACE_OBJ) if dtrace needs postprocessing. ($(PROGRAM)): ditto. (golf): ditto. (miniruby): ditto. ($(arch_hdrdir)/ruby/dtrace.d): new target. preprocessed verson of defs/dtrace.d. generated if necessary. ($(arch_hdrdir)/ruby/trace_dtrace.h): new target. definition of probes. ($(LIBRUBY_DTRACE_OBJ)): new target. generated if dtrace needs postprocessing. ($(DTRACE_OBJ)): ditto. ($(MINIDTRACE_OBJ)): ditto. ($(GOLFDTRACE_OBJ)): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26235 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/digest/digest.c (rb_digest_instance_method_unimpl): Suppressknu2009-12-311-2/+2
| | | | | | | | compiler warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26223 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/rubysocket.h: include addrinfo.h only when using our ownusa2009-12-311-0/+2
| | | | | | | | getaddrinfo.c. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26214 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/raddrinfo.c (addrinfo_type): typed.nobu2009-12-301-15/+18
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26211 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/extconf.rb: use have_struct_member.nobu2009-12-302-8/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26210 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/extconf.rb: fix for wide-getaddrinfo option.nobu2009-12-307-56/+60
| | | | | | | | * ext/socket/addrinfo.c: rename {addr,name}info functions to ensure those are used on darwin. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26209 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/extmk.rb: fix for extstatic.nobu2009-12-301-5/+7
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26205 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/win32ole/win32ole.c (foleparam_initialize): add foleparam_initializesuke2009-12-271-1/+75
| | | | | | | | | | to check argument of WIN32OLE_PARAM.new * test/win32ole/test_win32ole_param.rb (test_s_new): add some assertion to test WIN32OLE_PARAM.new git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26184 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/bigdecimal/bigdecimal_en.html: Remove obsolete information, fix typosmarcandre2009-12-061-28/+24
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26035 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/dl/cptr.c (to_int): DL::CPtr supports to_inttenderlove2009-12-041-0/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25996 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/stringio/stringio.c (ungetc): RDoc updated. trunk allowsnahi2009-12-041-4/+3
| | | | | | | pushing back behind the beginning of the pseudo stream. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25987 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/openssl/ossl_ssl.c: initialize @hostname of SSLSocket to avoid nahi2009-12-021-0/+3
| | | | | | | warning at SSLSocket#connect. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25976 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/extmk.rb (command_output): $makeflags are already quoted.nobu2009-11-301-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25965 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/digest/digest.c (rb_digest_instance_method_unimpl): Do notknu2009-11-251-4/+13
| | | | | | | | | call rb_inspect() on an object that does not implement necessary methods; reported by NaHi. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25920 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/getnameinfo.c: need to include extconf.h for HAVE_* macros.usa2009-11-191-0/+3
| | | | | | | | reported by Kenta Murata <mrkn AT mrkn.jp> via IRC. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25857 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/bigdecimal/bigdecimal.c (BigDecimalCmp): Fix comparisons [ruby-core:26646]marcandre2009-11-141-6/+4
| | | | | | * test/bigdecimal/test_bigdecimal.rb (class): Fix and improve tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25765 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/tk/lib/tk/variable.rb (TkVariable::coerce): fix bug on a numeric value.nagai2009-11-131-4/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25760 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/tk/lib/tk/variable.rb: TkVariable#*(other) and /(other) have anagai2009-11-131-2/+2
| | | | | | | bug on handling of the "other" value. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25754 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/zlib/zlib.c (rb_zlib_adler32): fix typo.mame2009-11-131-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25751 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/dl/cptr.c (rb_dlptr_s_to_ptr): when wrapping a pointer it shouldtenderlove2009-11-121-0/+1
| | | | | | | keep a reference to the object it's wrapping * test/dl/test_func.rb use standard test methods git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25742 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * string.c (rb_str_each_line): rdoc fixmarcandre2009-11-091-2/+4
| | | | | | * ext/bigdecimal/bigdecimal.c (#infinite?, #nonzero?): rdoc fix git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25699 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/dl/cfunc.c (**) updating documentationtenderlove2009-11-081-6/+37
| | | | | | | * test/dl/test_cfunc.rb (test_ptr=, test_ptr) testing the pointer accessor methods on CFunc git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25686 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/dl/cptr.c (rb_dlptr_inspect): making inspect consistent acrosstenderlove2009-11-071-1/+1
| | | | | | | platforms * test/dl/test_cptr.rb (test_inspect): testing inspect git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25684 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/dl/cfunc.c (rb_dlcfunc_initialize): cleaning up C macrostenderlove2009-11-061-9/+47
| | | | | | | * ext/dl/cfunc.c (**): adding documentation * test/dl/test_cfunc.rb (test_set_calltype) testing calltype git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25679 b2dd03c8-39d4-4d8f-98ff-823fe69b080e