Commit graph

2467 commits

Author SHA1 Message Date
yugui
67b79d6c84 merges r24616 from trunk into ruby_1_9_1.
--
* thread.c (rb_check_deadlock): decrease number of sleepers before
  deadlock detection because the deadlock exception makes main thread
  run.  [ruby-dev:39142]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@25541 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-28 14:15:54 +00:00
yugui
e966115c7d merges r24594 and r24604 from trunk into ruby_1_9_1.
--
Fix: change terminal's size on Widows when the window size is changed

* ext/readline/readline.c (readline_get): add rl_prep_terminal(1).
  insited by jitte [ruby-list:43546]
--
use rl_prep_terminal only on Windows. [ruby-core:25009]
* ext/readline/readline.c (readline_readline): use rb_prep_terminal
  only on Windows.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@25540 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-28 14:15:47 +00:00
yugui
d1154deec8 merges r24591 from trunk into ruby_1_9_1.
--
* thread.c (rb_thread_terminate_all): do not ignore interrupt when
  reaping threads on termination.  [ruby-dev:39107]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@25539 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-28 14:15:39 +00:00
yugui
8e996b793e merges r24585 from trunk into ruby_1_9_1.
--
* dir.c (DEFINE_STRUCT_DIRENT): use union to allocate sufficient
  memory space for Solaris.  a patch from Naohisa GOTO
  <ngoto at gen-info.osaka-u.ac.jp> in [ruby-dev:39132].
  [ruby-dev:39062]

* configure.in (SIZEOF_STRUCT_DIRENT_TOO_SMALL): Solaris dirent
  check.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@25538 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-28 14:15:32 +00:00
yugui
2f3fa385db merges r24579 and r24581 from trunk into ruby_1_9_1.
--
* compile.c (NODE_RETURN): fire return event at explicit return.
  [ruby-dev:38701]
--
* test/ruby/test_settracefunc.rb (test_return, test_return2): add two
  tests for [ruby-dev:38701] and [ruby-core:24463].
--
* parse.y (reduce_nodes_gen): preserve NODE_FL_NEWLINE flag during
  node reducing.  [ruby-core:24463]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@25537 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-28 14:15:24 +00:00
yugui
3b6e807a01 merges r24574 from trunk into ruby_1_9_1.
--
* vm_insnhelper.c (vm_call_cfunc): ensure hook c-return.
  [Bug #1588]

* test/ruby/test_settracefunc.rb (TestSetTraceFunc#test_raise):
  follow above.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@25536 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-28 14:15:16 +00:00
yugui
60a8777de7 merges r24569 from trunk into ruby_1_9_1.
--
* parse.y (lex_get_str, lex_io_gets, rb_parser_compile_string):
  must be ascii compatible.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@25535 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-28 14:15:07 +00:00
yugui
046ac45ac1 merges r24557 from trunk into ruby_1_9_1.
--
* parse.y (yylex): should dispatch scan-event even when follows
  just after delayed-token.  [ruby-dev:37855] [Bug #1071]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@25534 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-28 14:14:59 +00:00
yugui
b48105fcbb merges r24553 from trunk into ruby_1_9_1.
--
* lib/csv.rb: Change magic comment to US-ASCII in order to
  make literals as US-ASCII.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@25533 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-28 14:14:51 +00:00
svn
6a1718b754 * 2009-10-28
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@25532 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-28 14:10:14 +00:00
yugui
192cd9cffe merges r24550,r24551 and r24552 from trunk into ruby_1_9_1.
--
* regparse.c (parse_char_class, parse_exp, parse_branch),
  (parse_subexp): fixed memory leak.  a patch from Ralf Junker
  <ralfjunker AT gmx.de> at [ruby-core:24921].
--
* regparse.c: commit miss.
--
* regparse.c: commit miss again.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@25531 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-28 14:10:11 +00:00
yugui
7d6b25443a merges r24546 from trunk into ruby_1_9_1.
--
* regparse.c (add_ctype_to_cc_by_range): fix the first
  character bigger than sb_out was dropped.

* test/ruby/test_regexp.rb (TestRegexp#test_posix_bracket):
  add tests for above.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@25484 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-25 14:47:06 +00:00
yugui
3be5adeb64 merges r24536 from trunk into ruby_1_9_1.
--
* configure.in (rubyhdrdir): fixed typo.  [ruby-dev:39079]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@25483 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-25 14:46:58 +00:00
yugui
25a08521f4 merges r24533 from trunk into ruby_1_9_1.
--
* doc/ChangeLog-1.8.0: add forgotten entry contributed by
  TAKAHASHI Kaoru.  [ruby-dev:39065]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@25482 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-25 14:46:51 +00:00
yugui
547ef3bcd7 merges r24531 from trunk into ruby_1_9_1.
--
* lib/delegate.rb (Delegator#method_missing): __FILE__ may contain
  multi-byte characters.  a patch from Kenta Murata in [ruby-dev:39066].

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@25481 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-25 14:46:43 +00:00
yugui
5a1fa79086 merges r24530 from trunk into ruby_1_9_1.
--
* vm.c (vm_exec): returning from lambda runs ensure section.
  [Bug #1729]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@25480 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-25 14:46:36 +00:00
yugui
3e26b95145 merges r24509 from trunk into ruby_1_9_1.
--
* string.c (rb_str_new_frozen): must not change encoding of frozen
  shared string.  [ruby-dev:39068]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@25477 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-25 14:46:11 +00:00
yugui
0cfb043b45 merges r25411 from trunk into ruby_1_9_1.
--
* marshal.c (w_symbol, r_symreal): fixed the order of symbol and
  its encoding modifier, in order to make the dump readable from
  1.8.  [ruby-dev:39515]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@25475 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-25 14:45:54 +00:00
yugui
d50e1bdcd7 merges r24488, r24489 and r24493 from trunk into ruby_1_9_1.
--
* marshal.c (class2path, w_unique, w_extended, w_class, w_uclass):
  deal with non-ascii class path.  [ruby-core:24790]

* marshal.c (r_unique, path2class, path2module, obj_alloc_by_path),
  (r_object0): ditto.

* variable.c (rb_path_to_class): new encoding-aware function to
  get a class from its name.
--
* marshal.c (must_not_be_anonymous): fixed silly miss.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@25474 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-25 14:45:47 +00:00
yugui
3354c14cd4 merges r24443 from trunk into ruby_1_9_1.
--
* marshal.c (w_symbol r_symlink, r_symbol, r_object0): fix for
  non-ascii symbols.  loading such symbols can cause segfaults in
  older versions.  [ruby-core:24788]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@25473 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-25 14:45:39 +00:00
svn
d2bb312a40 * 2009-10-25
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@25472 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-25 14:39:23 +00:00
yugui
ecb16d6db7 merges r24479 from trunk into ruby_1_9_1.
--
* ext/ripper/eventids2.c (token_to_eventid): added
  keyword_do_LAMBDA.  [ruby-dev:39049]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@25471 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-25 14:39:21 +00:00
yugui
6f53e25c7c merges r24403 and r24439 from trunk into ruby_1_9_1.
--
* eval.c (rb_exc_raise, rb_exc_fatal): require exception object.
  [ruby-core:24767]
--
* eval.c (rb_exc_raise, rb_exc_fatal): nil is used to reraise.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@24476 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-08 15:35:59 +00:00
yugui
226a7a81d6 merges r24415,r24426,r24427,r24428,r24433,r24434 and r24435 from trunk into ruby_1_9_1.
--
* ext/digest/sha2/sha2.[ch]: Update to 1.0 RELEASE which fixes an
  off-by-one bug in SHA-256 hashing.  Reduce differences from
  the original while at it. [Bug #1799]
--
* ext/digest/sha2/sha2.h (BYTE_ORDER): Define BYTE_ORDER as
  necessary. [ruby-dev:39029]
--
	* ext/digest/sha2/sha2.c (*_Final): typos.
--
	* ext/digest/sha2/lib/sha2.eb: should require sha2.so.
--
* ext/digest/*/extconf.rb: inttypes.h and unistd.h need not be
  checked here. [ruby-dev:39032]
--
* ext/digest/sha2/sha2.c: The ULL suffix is not supported by
  pre-C99 compilers, so resurrect the ULL() macro to regain
  portability. [ruby-dev:39032]
--
Fix a typo.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@24475 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-08 15:35:43 +00:00
yugui
217fbb2cf0 merges r24425 from trunk into ruby_1_9_1.
--
* encoding.c (rb_enc_associate_index): cannot set encoding on
  special constants.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@24474 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-08 15:35:29 +00:00
yugui
ff3f19a16c merges the latter half of r24423 from trunk into ruby_1_9_1.
* encoding.c (enc_capable, rb_enc_get_index): Symbol is encoding
  capable.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@24473 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-08 15:35:16 +00:00
yugui
968f2e8627 merges r24422 from trunk into ruby_1_9_1.
--
* encoding.c (rb_enc_get_index): fixed indent.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@24472 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-08 15:35:04 +00:00
yugui
9f79faa5d5 merges r24408 and r24409 from trunk into ruby_1_9_1.
--
* ruby.c (rb_stdio_set_default_encoding): declared.
--
* io.c (rb_stdio_set_default_encoding): prototyped.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@24471 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-08 15:34:48 +00:00
yugui
392762807f merges r24407 from trunk into ruby_1_9_1.
--
* debug.c (ruby_dummy_gdb_enums): made public.  [ruby-dev:39001]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@24470 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-08 15:34:36 +00:00
yugui
48500e49b7 merges r24405 from trunk into ruby_1_9_1.
--
* range.c (range_eql, range_eq): fixed equality to work for
  subclasses of Range.  a patch from Marc-Andre Lafortune.
   [ruby-core:22190]

* test/ruby/test_range.rb: add assertions for above.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@24469 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-08 15:34:26 +00:00
yugui
4ef1f3eafe merges r24404 from trunk into ruby_1_9_1.
--
* bootstraptest/test_exception.rb: test for [ruby-core:24767].

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@24468 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-08 15:34:14 +00:00
yugui
df359ef462 merges r24401 from trunk into ruby_1_9_1.
--
* eval.c (rb_longjmp): reset raised flag before fatal error.

* eval_error.c (error_print): file can be NULL. line can be 0.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@24467 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-08 15:34:03 +00:00
yugui
b1e7a961d2 merges r24396 from trunk into ruby_1_9_1.
--
* lib/pp.rb (guard_inspect_key): untrust internal hash to prevent
  unexpected SecurityError.

* test/ruby/test_object.rb: add a test for [ruby-dev:38982].

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@24466 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-08 15:33:47 +00:00
yugui
59dc7d4c96 merges r24389 from trunk into ruby_1_9_1.
--
	* win32/win32.c (has_redirection): need to execute shell if commandline
	  includes newline.  cf. [ruby-core:24560]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@24465 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-08 15:33:32 +00:00
yugui
dd8b1350b0 merges r24381 from trunk into ruby_1_9_1.
--
* thread.c (recursive_push): need to set UNTRUST.  [ruby-dev:38997]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@24464 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-08 15:33:20 +00:00
yugui
5c4e05232e merges r24372 from trunk into ruby_1_9_1.
--
* sample/svr.rb: obsolete TCPserver renamed.  [ruby-core:24712]

* sample/tsvr.rb: ditto.

* sample/dualstack-httpd.rb: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@24463 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-08 15:33:06 +00:00
yugui
4f19613f4a merges r24371 from trunk into ruby_1_9_1.
--
* thread.c (recursive_push): untrust internal hash to prevent
  unexpected SecurityError.  a patch from Kazuhiro NISHIYAMA.
  Fix: #1864  [ruby-dev:38982]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@24462 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-08 15:32:51 +00:00
yugui
66a76d0c44 merges r24368 from trunk into ruby_1_9_1.
--
* lib/README: updated.  a patch from Daniel Bovensiepen.
  [ruby-core:24693]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@24461 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-08 15:32:40 +00:00
yugui
2fd6766226 merges r24367 from trunk into ruby_1_9_1.
--
	* 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_9_1@24460 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-08 15:32:23 +00:00
yugui
7ad4bd137d merges r24364 from trunk into ruby_1_9_1.
--
* array.c (rb_ary_{permutation,combination}): disallow reentrance
  with continuation since work-buffers cannot restore.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@24459 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-08 15:32:09 +00:00
yugui
208ec9936a merges r24361 from trunk into ruby_1_9_1.
--
* numeric.c (flo_hash): normalize -0.0 to 0.0.  [ruby-core:24577]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@24458 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-08 15:31:53 +00:00
yugui
04f65b4127 merges r24342 and r24348 from trunk into ruby_1_9_1.
--
 Can't use singlebyte optimization when the replacement is multibyte. [ruby-core:24612]

 * string.c (tr_trans): can't use singlebyte optimization when
          the replacement is multibyte. [ruby-core:24612]
--
* string.c (tr_trans): change condition of singlebyte optimization.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@24457 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-08 15:31:35 +00:00
yugui
944148dd91 merges r24337 from trunk into ruby_1_9_1.
--
Set encodings of stdio after setting default internal and external.

* io.c (rb_stdio_set_default_encoding): added.

* ruby.c (process_options): call rb_stdio_set_default_encoding
  after setting defualt internal and external.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@24456 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-08 15:31:15 +00:00
yugui
a036553eb5 merges r24341 from trunk into ruby_1_9_1.
--
	* lib/securerandom.rb (SecureRandom.random_bytes): return string should
	  be ASCII-8BIT.  [ruby-core:24640]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@24455 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-08 15:30:55 +00:00
svn
66fc689c36 * 2009-08-09
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@24454 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-08 15:28:15 +00:00
yugui
a97190548f merges r24332 and r24333 from trunk into ruby_1_9_1.
--
* parse.y (literal_concat_gen): NODE_DSTR was incorrectly handled as
  NODE_STR.  [ruby-dev:38968]

* bootstraptest/test_syntax.rb: add a test for above.
--
* parse.y (literal_concat_gen): reduced unnecessary node at string
  literal concatenation with empty head dstr.  [ruby-dev:38968]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@24453 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-08 15:28:03 +00:00
yugui
ff17ee0d31 merges r24328 from trunk into ruby_1_9_1.
--

* gem_prelude.rb (Gem.path): uses Gem.default_path as a default value
  so that ruby finds gems in ~/.gem/.
  (Gem.user_home): reduced version of lib/rubygems.rb's.
  Gem.default_path needs it.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@24452 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-08 10:56:38 +00:00
yugui
23cc3c2b87 merges r24323 from trunk into ruby_1_9_1.
--
* compile.c (iseq_compile_each): fix stack consistency error.
  [ruby-core:24611]

* bootstraptest/test_method.rb: add tests for above.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@24451 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-08 10:56:25 +00:00
yugui
66b90d0f5c merges r24321 from trunk into ruby_1_9_1.
--
* insns.def (defineclass): preserve encoding of class/module
  names.  [ruby-core:24600]

* variable.c (rb_set_class_path_string): set class path with a
  string value.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@24450 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-08 10:56:14 +00:00
yugui
391fc1e8d9 merges r24271 from trunk into ruby_1_9_1.
--
* io.c (argf_eof): should not have reached EOF before trying to
  read.  based on a patch by Heesob Park <phasis AT gmail.com> at
  [ruby-core:24559].  [ruby-core:24557]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@24449 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-08 10:56:00 +00:00