Commit graph

1966 commits

Author SHA1 Message Date
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
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
3a724e086a merges r24513,r24514 and r24515 from trunk into ruby_1_9_1.
--
* class.c (rb_define_class_id_under, rb_define_module_id_under):
  new functions to define a nested class/module with non-ascii
  name.

* struct.c (make_struct): use name with encoding.

* struct.c (inspect_struct): ditto.  [ruby-core:24849]
--
* test/ruby/test_marshal.rb (test_class_nonascii): test for non-ascii name class.
--
* class.c (rb_define_module_id_under): fix the name.

* class.c (rb_define_module_under): fix for prevvious changes.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@25479 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-25 14:46:28 +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
f935d5f4f6 * test/ruby/test_m17n.rb (TestM17N#test_sprintf_s):
added an assertion for [ruby-list:46274].
  see also r24506.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@25476 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-25 14:46:01 +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
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
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
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
yugui
b6a98140d5 merges r24243 from trunk into ruby_1_9_1.
--
* vm_core.h (struct rb_iseq_t): add a new field line_no.  This field
  represents line number from which the original code of the iseq
  starts.  [ruby-dev:38698]

* iseq.c, compile.c: ditto.

* parse.y: line number hack (for Proc#source_location) is no longer
  needed.

* test/ruby/test_settracefunc.rb: line number of set_trace_func is now
  compatible with 1.8's.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@24446 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-08 10:52:38 +00:00
yugui
cd516cbbe0 merges r24203 from trunk into ruby_1_9_1.
--
* io.c (io_read): should taint the result.   [ruby-dev:38826]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@24290 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-26 15:32:28 +00:00
yugui
38687bec0d merges r24148 from trunk into ruby_1_9_1.
--
* id.c (Init_id), vm.c (vm_exec): @#__ThrowState__ is no longer
  used.  [ruby-dev:38760]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@24172 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-17 13:31:50 +00:00
yugui
52cc8ef40d merges r24091 from trunk into ruby_1_9_1.
--

* lib/prime.rb (Prime#prime_division): now decomposes
  negative integer into a decomposition with element [-1, 1].

* test/test_prime.rb: test for it.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@24121 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-15 11:58:10 +00:00
yugui
6646cf7d09 merges r24016 from trunk into ruby_1_9_1.
--
Add test for marshaling regexp.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@24080 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-13 08:08:14 +00:00
yugui
f70e60783e merges r24012 from trunk into ruby_1_9_1.
--
* vm_insnhelper.c (vm_search_superclass): checks for implicit
  argument passing before method search.  [ruby-core:24244]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@24077 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-13 08:07:36 +00:00
yugui
cb3df565d7 merges r23989 from trunk into ruby_1_9_1.
--
* file.c (rb_file_s_basename): returns new string instead of
  shared string from FilePathStringValue().  [ruby-core:24199]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@24073 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-13 06:13:38 +00:00
yugui
b9faaa1832 merges r23970 from trunk into ruby_1_9_1.
--
* proc.c (make_curry_proc): should propagate lambda-ness.
  [ruby-core:24127]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@24069 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-13 06:12:36 +00:00
yugui
4240de3c6d merges r23959 from trunk into ruby_1_9_1.
--
* thread.c (rb_threadptr_exec_event_hooks): new function to
  execute event hooks, with preserving errinfo.  [ruby-core:24118]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@24068 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-13 06:10:26 +00:00
yugui
073598064e merges r23956 from trunk into ruby_1_9_1.
--
* vm_insnhelper.c (vm_yield_setup_block_args): restores the first
  arg where is overwritten at funcall.  [ruby-core:24139]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@24054 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-12 14:46:46 +00:00
yugui
9331ca8fc2 merges r23946 from trunk into ruby_1_9_1.
--
	* complex.c: undef-ed shome methods.  [ruby-core:24110]

	* complex.c (Numeric#arg): NaN for NaN.  [ruby-core:24116]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@24053 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-12 14:46:35 +00:00
yugui
5a7efe4dbf merges r23918 and r23919 from trunk into ruby_1_9_1.
--
* marshal.c (w_encoding): encodings need extra depth.
  [ruby-core:24100]
--
* test/ruby/test_marshal.rb (TestMarshal#test_limit): test for
  [ruby-core:24100].

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@24050 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-12 14:45:57 +00:00
yugui
61c0c7ab5d merges r23891 from trunk into ruby_1_9_1.
--
* dln.c (dln_find_1): fix for files with dots.  [ruby-dev:38588]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@24046 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-12 14:44:54 +00:00
yugui
24523af7cc merges r23730 from trunk into ruby_1_9_1.
--
* numeric.c (flo_cmp): Infinity is greater than any bignum
  number.  [ruby-dev:38672]

* bignum.c (rb_big_cmp): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@23798 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-21 10:34:46 +00:00
yugui
c2d571c37f merges r23718 from trunk into ruby_1_9_1.
--
	* complex.c (nucomp_coerce): accepts Complex instances.

	* rational.c (nurat_coerce): accepts Rational
	  instances. [ruby-core:23859]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@23793 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-21 09:16:44 +00:00
yugui
b00a819511 merges the latter half of r23699 and r23706 from trunk into ruby_1_9_1.
--
* io.c (argf_skip): should close only when current_file is available.
--
* test/ruby/test_argf.rb (TestArgf#test_skip): updated test
  according to clarified behavior.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@23790 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-21 09:16:06 +00:00
yugui
6e1696743c merges r23642 from trunk into ruby_1_9_1.
--
removed extra spaces.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@23777 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-21 09:13:25 +00:00
yugui
5e479b4e09 merges r23618 from trunk into ruby_1_9_1.
--
* test/ripper/test_filter.rb: add tests. see [ruby-dev:37856]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@23775 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-21 09:12:56 +00:00
yugui
41353c51a0 merges r23616 from trunk into ruby_1_9_1.
--
* cont.c (cont_capture, fiber_store): reraise transferred error.

* cont.c (fiber_switch): transfers dead fiber error to the previouse
  or root fiber if the current fiber is dead.  [ruby-core:23651]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@23766 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-20 09:08:10 +00:00
yugui
67a3f2eebc merges r23562 and r23564 from trunk into ruby_1_9_1.
--
* string.c (rb_str_partition): should use the converted result.  a
  patch from Marc-Andre Lafortune at [ruby-core:23540].
--
* string.c (rb_str_rpartition): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@23761 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-20 09:07:02 +00:00
yugui
0ddc830573 merges r23557 and r23563 from trunk into ruby_1_9_1.
--
* thread.c (rb_exec_recursive_paired): new function for proper
  handling of recursive arrays.  [EXPERIMENTAL] [ruby-core:23402]

* array.c (rb_ary_equal, rb_ary_eql, rb_ary_cmp): use above.

* hash.c (hash_equal): ditto.
--
* test/ruby/test_hash.rb (TestHash::test_equal2): recursive hashes
  are handled properly now. ref: [ruby-core:23402]

* test/ruby/test_m17n.rb (TestM17N#test_sprintf_p): test fixed

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@23759 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-20 09:06:35 +00:00
yugui
fff99de832 merges r23451 from trunk into ruby_1_9_1.
--
* lib/rss/parser.rb, test/test_parser_1.0.rb: fix foaf:Image
  element causes parse error even if ignore_unknown_element mode.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@23532 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-05-22 09:49:01 +00:00
yugui
17f26eef3c merges r23446 from trunk into ruby_1_9_1.
--
* lib/rss/maker/feed.rb, test/test_maker_atom_entry.rb,
  test/test_maker_atom_feed.rb: fix duplicated dc:date.
  Reported by Kazuhiro NISHIYAMA. Thanks!!! [ruby-list:46014]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@23530 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-05-22 09:48:40 +00:00
yugui
ce1a4ee112 merges r23424 from trunk into ruby_1_9_1.
--
* ext/stringio/stringio.c (strio_ungetbyte): encoding should not
  be effective.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@23520 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-05-21 14:48:03 +00:00
yugui
c378fbc511 merges r23378 from trunk into ruby_1_9_1.
--
* test/ruby/test_float.rb (TestFloat#test_sleep_with_Float): add a
  test. see [ruby-core:23282]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@23516 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-05-21 14:47:33 +00:00
yugui
6d3ef1b238 merges r23362 from trunk into ruby_1_9_1.
--
* test/ruby/test_rubyoptions.rb (test_indentation_check): add a test
  for indentation check.  [ruby-dev:38382]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@23514 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-05-21 14:47:21 +00:00
yugui
3c84bb3147 merges r23361 from trunk into ruby_1_9_1.
--
* array.c (rb_ary_flatten_bang): returns nil if nothing changed.
  a patch from Marc-Andre Lafortune in [ruby-core:23382].

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@23513 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-05-21 14:47:11 +00:00
yugui
5453b6d4a7 merges r23359 from trunk into ruby_1_9_1.
--
* array.c (rb_ary_sample): negative sample number is invalid.
  [ruby-core:23374]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@23512 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-05-21 14:47:02 +00:00
yugui
19ad6658b5 merges r23286 from trunk into ruby_1_9_1.
--
* lib/optparse.rb (OptionParser#parse_in_order): do not make an
  option from non-option argument.  [ruby-dev:38333]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@23396 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-05-11 15:05:43 +00:00
yugui
974d1ae287 merges r23191 from trunk into ruby_1_9_1.
--
* array.c (rb_ary_flatten): flatten(0) works as Array#dup.
  [ruby-core:23168]

* test/ruby/test_array.rb: add a test for above.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@23339 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-05-04 12:30:55 +00:00
yugui
102ccac988 merges r23160 from trunk into ruby_1_9_1.
--
* string.c (rb_str_dump): buffer length plus one byte for null
  terminator.  [ruby-dev:38294]

* test/ruby/test_m17n.rb (test_str_dump): add a test for above.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@23334 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-05-04 12:30:06 +00:00
yugui
52e721592f merges r23159 from trunk into ruby_1_9_1.
--
* string.c (rb_str_rstrip_bang): should not sign-expand non-ascii.
  [ruby-core:23158]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@23333 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-05-04 12:29:55 +00:00
yugui
1de888d407 merges r23155 and r23158 from trunk into ruby_1_9_1.
--
* string.c (rb_str_chop_bang): reset coderange. [ruby-core:23155]
--
* test/ruby/test_string.rb (test_chop, test_chop!): tests for [ruby-core:23155].

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@23332 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-05-04 12:29:44 +00:00
yugui
2f491ea202 merges r23075 from trunk into ruby_1_9_1.
--
* time.c (time_cmp): negate the result of reverse comparison.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@23227 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-04-19 13:34:51 +00:00
yugui
22bdfe1413 merges r22987 from trunk into ruby_1_9_1.
--
* 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_9_1@23217 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-04-19 13:33:18 +00:00
yugui
447818ea3b merges r22741 from trunk into ruby_1_9_1.
--

* lib/prime.rb (Prime::prime?): used to return a wrong answer.
  [ruby-core:22646].

* test/test_prime.rb (test_prime?): test case for [ruby-core:22646].

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@23176 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-04-12 14:02:19 +00:00
yugui
af2d1789ed merges r22611 from trunk into ruby_1_9_1.
--
* string.c (rb_str_force_encoding): should clear coderange at changing
  encoding.  [ruby-core:22437]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@22745 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-04 09:19:09 +00:00