Commit graph

1964 commits

Author SHA1 Message Date
shyouhei
a185b734fe merge revision(s) 25343:
* ext/iconv/iconv.c (iconv_create): cannot retry with given block.
	  [ruby-dev:39487]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@25902 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-24 07:18:40 +00:00
shyouhei
06b911ea00 merge revision(s) 25340:
* lib/net/imap.rb (resp_text_code): accepts response codes without
	  text.  backported from trunk.  [ruby-core:24194]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@25901 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-24 07:14:33 +00:00
shyouhei
1298533806 merge revision(s) 25311:
* lib/net/ftp.rb (getaddress): rescue exceptions.  [ruby-dev:39451]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@25900 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-24 07:11:41 +00:00
shyouhei
5f10f47531 merge revision(s) 25269:
* ext/curses/curses.c: Many functions of module Curses could cause a
	  crash if the ncurses library was not properly initialized.
	  Fix pointed out by Alexander Beisig [ruby-core:22592]
	  Functions fixed: attroff, attron, attrset, bkgd, bkgdset,
	  can_change_color, close_screen, closed, color_content, curs_set,
	  def_prog_mode, delch, deleteln, getmouse, getstr, has_colors,
	  init_color, init_pair, insertln, keyname, mouseinterval, mousemask,
	  pair_content, pair_number, reset_prog_mode, resizeterm, scrl,
	  setscrreg, standend, standout, start_color, timeout, ungetmouse


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@25899 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-24 07:02:04 +00:00
shyouhei
b27be82d83 merge revision(s) 25246:
* lib/resolv.rb (Resolv::DNS.bind_random_port): bind to "::" for IPv6.
	  (Resolv::DNS::ConnectedUDP#initialize): specify is_ipv6 argument of
	  bind_random_port.
	  [ruby-core:25970]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@25873 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-20 06:52:18 +00:00
shyouhei
d7b8cbbaf3 merge revision(s) 25230:25233:
* lib/cgi.rb (CGI.unescapeHTML): fix for hex values 80-FF,
	  single-byte hex entity encodings from 80-FF are valid HTML.
		[ruby-core:25702]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@25856 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-19 09:08:10 +00:00
shyouhei
2dae3d23d2 merge revision(s) 25181:
* io.c (rb_io_fptr_finalize): free fptr to avoid memory leaks.
	  fixed: #2009   [ruby-core:25173] [ruby-dev:39410]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@25852 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-19 06:51:19 +00:00
shyouhei
6cef092f68 merge revision(s) 25098:
* lib/net/http.rb (transport_request): Handle timeout error by
	  closing socket if exception raised. [ruby-core:20976]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@25851 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-19 06:32:19 +00:00
shyouhei
5b3f05ab6a merge revision(s) 25069:
* ext/openssl/ossl_config.c (ossl_config_add_value_m,
	  ossl_config_set_section): Check if frozen (or untainted for $SECURE >=
	  4) [ruby-core:18377]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@25839 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-18 05:20:22 +00:00
shyouhei
4a965795f8 merge revision(s) 24993:24997,25069:25074:
* win32/win32.c (rb_w32_select): wait specified time on select.
	* win32/win32.c (rb_w32_select): on 1.8, we don't need to poll sockets,
	  because our select is never called from multiple threads.
	* instruby.rb: win32/win32.h exists in srcdir.
	  reported by arton ( http://www.artonx.org/diary/20090919.html#p01 )
	* win32/win32.c (subtract): if the parameters are same value, should
	  return zero.
	* win32/win32.c (rb_w32_select): of course, need to initialize rest.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@25838 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-18 05:13:34 +00:00
shyouhei
8162d69dda merge revision(s) 24958,24979:
* eval.c (rb_thread_start_timer): start to catch SIGVTALRM together
	  with timer thread.   [ruby-core:25606]
	* eval.c (rb_thread_atfork): stop timer thread.
	* eval.c (rb_thread_start_0, rb_thread_start_1): should call star
	  timer after added new thread to thread list.  [ruby-core:25613]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@25819 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-17 07:32:15 +00:00
shyouhei
eaa8ca6b78 merge revision(s) 24913:
* lib/cgi/cookie.rb (value): Keep CGI::Cookie#value in sync with the
	  cookie itself. A patch by Arthur Schreiber [ruby-core:17634]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@25817 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-17 07:16:41 +00:00
shyouhei
29929d799d merge revision(s) 24911:
* lib/irb/ext/multi-irb.rb: Fix arguments handling for shell commands
	  in irb; a patch by Yusuke Endoh [ruby-dev:35075]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@25814 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-17 06:51:29 +00:00
shyouhei
d9abe0513d merge revision(s) 24751:
* io.c (rb_io_binmode): check if closed regardless platforms.
	  [ruby-core:25363]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@25812 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-17 06:44:28 +00:00
shyouhei
cfa3a72cc2 merge revision(s) 24750:
* numeric.c (round): added declaration.  [ruby-dev:39222]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@25811 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-17 06:31:41 +00:00
shyouhei
50c667a837 merge revision(s) 24713:
* gc.c (gc_sweep): makes new room if object space is full of
	  finalized objects and has no free objects.  [ruby-dev:39201]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@25801 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-16 11:00:15 +00:00
shyouhei
3eafecb77e merge revision(s) 23353:
* util.c: suppress strict-aliasing warning with gcc-4.4.0 -O2 to fix
	  infinite loop by ruby -e "1.402e-45" .


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@25800 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-16 10:53:12 +00:00
shyouhei
3e488e98ff * ext/bigdecimal/bigdecimal.c (BigDecimal_to_i): revert a part of
r23645, which was not a bug fix. [ruby-dev:39474]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@25799 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-16 10:42:23 +00:00
svn
3a814d04b1 * 2009-11-09
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@25695 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-08 17:46:40 +00:00
shyouhei
e2bc9db763 merge revision(s) 22679:
* class.c (rb_singleton_class_clone): Qnil must be used for a null
	  class reference when we use NIL_P() to check class reference
	  validity.  The bug was exposed by the spec test of Sequel.
	* eval.c (ruby_init): Use NEW_CREF().


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@24843 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-11 03:23:37 +00:00
shyouhei
cc29e1af24 merge revision(s) 24496:
* io.c (rb_sysopen): workaround for MSVCRT's bug.
	  [ruby-core:24838]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@24824 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-10 01:53:25 +00:00
shyouhei
e8c18c977e merge revision(s) 24413,24416,24442:
* eval.c (rb_thread_schedule): fix condition for making thread
	  runnable.  [ruby-core:23515]
	* eval.c (rb_thread_schedule): refine previous change.
	* eval.c (rb_thread_schedule): need select for WAIT_SELECT, even if
	  already timeout.  [ruby-dev:38971]
	  (WAIT_DONE): defined for mark threads which can be runnable.
	* ext/digest/sha2/sha2.h: include inttypes.h for uint32_t, etc.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@24783 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-07 10:59:37 +00:00
shyouhei
ae6799529d merge revision(s) 24403:
* eval.c (rb_exc_raise, rb_exc_fatal): require exception object.
	  [ruby-core:24767]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@24772 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-06 14:04:47 +00:00
shyouhei
0cf8e3072c merge revision(s) 24369:
* win32/win32.c (rb_w32_connect): return value was broken when some
	  error occurred.
	  [ruby-core:24234]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@24763 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-05 16:35:26 +00:00
shyouhei
cb3a1c5f37 merge revision(s) 24283:24296:
* io.c (argf_eof): go to the next file if called after ARGF.close
	  or ARGF.skip.  a patch from Mike Kasick at [ruby-core:24561].


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@24747 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-04 01:05:10 +00:00
shyouhei
4ed5e8bb9f merge revision(s) 24254:
* lib/irb.rb, lib/irb/init.rb, lib/irb/ext/save-history.rb: add
	  IRB::irb_at_exit. no use finalizer saving history. [ruby-dev-38563]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@24483 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-09 08:44:15 +00:00
shyouhei
66c9241789 merge revision(s) 24223:
* io.c (rb_io_flush): fsync() after buffer is flushed on win32.
	  backported from trunk.  [ruby-core:20043]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@24406 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-05 06:30:11 +00:00
shyouhei
f66f36d371 merge revision(s) 24190,24192:
* re.h (RMATCH_REGS): added for compatibility.
	* ruby.h (RFLOAT_VALUE, RSTRING_END, RREGEXP_SRC_*, RBIGNUM_*):
	  backported macros for compatiblity from trunk.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@24385 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-04 02:04:58 +00:00
shyouhei
cb5e639da8 merge revision(s) 23943:
* lib/complex.rb (Numeric#arg): should return NaN for NaN.
	  [ruby-core:24116]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@24362 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-03 05:59:38 +00:00
shyouhei
3799f1bbd8 merge revision(s) 23740:
* bignum.c (big_lshift, big_rshift): return Bignum always withou
	  normalization.  [ruby-dev:38680]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@24313 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-30 00:31:59 +00:00
shyouhei
1d18ec7ea6 merge revision(s) 23700:
* io.c (argf_close): always call #close method.  [ruby-core:23853]
	* io.c (argf_skip): should close only when current_file is available.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@24312 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-29 02:44:29 +00:00
shyouhei
151087a834 merge revision(s) 23624:
* enum.c (first_i): Enumerator#first should consume only what is
	  needed.   a patch from Marc-Andre Lafortune.  [ruby-core:23661]
	* enum.c (take_i): ditto.
	* enum.c (enum_first): call to_int once for an argument.  a patch
	  from Marc-Andre Lafortune.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@24272 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-25 12:36:29 +00:00
shyouhei
f815568fc6 merge revision(s) 23558:
* lib/cgi.rb (HTTP_STATUS): typo fixed.   [ruby-dev:38538]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@24261 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-24 08:20:02 +00:00
shyouhei
bc8a273ec2 merge revision(s) 23504:
* lib/rexml/text.rb (REXML::Text.normalize): call to_s for input.
	  [ruby-talk:337069]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@24244 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-22 14:54:58 +00:00
shyouhei
e877f7e217 merge revision(s) 23479:
* lib/mkmf.rb (SRC_EXT): should be flat.
	  http://twitter.com/_tad_/status/1825862632


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@24221 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-21 09:24:26 +00:00
shyouhei
68201165ed * gc.c (rb_gc_call_finalizer_at_exit): finalizer_table can be NULL.
[ruby-core:24395]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@24178 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-17 15:48:05 +00:00
shyouhei
4156653bc0 merge revision(s) 23380:
* lib/delegate.rb (Delegator#method_missing)
	  (DelegateClass()#method_missing): Properly pass a given block
	  through. [ruby-dev:38390]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@24136 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-16 00:35:14 +00:00
shyouhei
e3ba58bb2c merge revision(s) 23306:
* file.c (rb_file_join): recursive array has no meaning as path
	  name.  [ruby-core:23329]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@24114 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-15 02:50:57 +00:00
shyouhei
262c620e90 merge revision(s) 23202,23268,23305:
* eval.c (safe_mutex_lock): pthread_cleanup_push() must not be
	  inside parens.
	* eval.c (rb_thread_start_timer): guard condition was inverted.
	  [ruby-dev:38319]
	* eval.c (get_ts): use readtime clock.  [ruby-dev:38354]
	* eval.c (rb_thread_stop_timer): clear thread_init while locking.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@24104 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-14 11:31:37 +00:00
shyouhei
4fffacd9a5 merge revision(s) 23259,24059:
* time.c (time_timeval): check out-of-range.  [ruby-core:23282]
	  [Bug #1396]
	* time.c (time_timeval): rounds subsecond toward zero.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@24060 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-12 16:42:27 +00:00
shyouhei
7adb8681f0 merge revision(s) 23257:
* eval.c (proc_invoke): shares dmethod scope local variables.
	  a patch from coderrr at [ruby-core:23050]
	* gc.c (obj_free): do not free cloned scope local variables.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@23997 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-09 09:05:18 +00:00
shyouhei
a563f71398 merge revision(s) 23201:
* eval.c (rb_thread_remove): stops timer thread unless other
	  threads exist.  [ruby-core:18444]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@23993 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-08 10:58:03 +00:00
shyouhei
4b4ac8ac64 merge revision(s) 23096:
* eval.c (rb_eval): checks for interrupt, stack and finalizers too.
	  [ruby-dev:38208], [Bug #1329]
	* eval.c (eval): replaces the message if frozen.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@23972 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-06 07:25:47 +00:00
shyouhei
473f3eed13 merge revision(s) 23032:
* lib/test/unit.rb: use Kernel.exit to get rid of using
	  IRB::ExtendCommandBundle#exit.  a patch from Dmitry Vazhov by
	  [ruby-core:22986].


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@23954 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-04 18:55:44 +00:00
shyouhei
fa41658f96 merge revision(s) 22996:
* lib/drb/drb.rb (open_server_inaddr_any): fixed multiple network
	  families problem. a patch from Charl Matthee at [ruby-core:21033].


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@23940 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-03 00:40:40 +00:00
shyouhei
30b0fe4cc2 merge revision(s) 22988:
* lib/pathname.rb (Pathname#sub): set $~ in block.binding.
	  [ruby-dev:38173]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@23920 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-01 06:48:23 +00:00
shyouhei
fec18c0bc2 merge revision(s) 22937:
* lib/fileutils.rb (FileUtils#fu_get_gid): stringify group
	  argument before making regexp match.  [ruby-dev:38155]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@23887 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-29 04:21:32 +00:00
shyouhei
5eef94c8ce merge revision(s) 23662:
* ext/bigdecimal/bigdecimal.c (VpToString): fixed a bug introduced
	  in r23613.  [ruby-talk:338957]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@23671 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-12 07:39:31 +00:00
shyouhei
ca94967d3e merge revision(s) 22627:
* eval.c (rb_thread_schedule): mswin32 doesn't have F_GETFD, so check
	  with another method.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@23648 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-08 01:59:39 +00:00
shyouhei
9f215f197b merge revision(s) 23610:23613:
* ext/bigdecimal/bigdecimal.c (VpAlloc): avoid ALLOCA_N() to avoid
	  segmentation fault caused by (insanely) long decimal values.
	  backported from 1.9.
	* ext/bigdecimal/bigdecimal.c (BigDecimal_dump, BigDecimal_to_i,
	  BigDecimal_to_f, BigDecimal_to_s, BigDecimal_split,
	  BigDecimal_inspect): ditto.
	* ext/bigdecimal/bigdecimal.c (BigDecimal_to_f): returns Inf if
	  exp is bigger than DBL_MANT_DIG.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@23645 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-07 23:37:55 +00:00