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

11840 Коммитов

Автор SHA1 Сообщение Дата
akr eb5789e2ac add a test for [ruby-dev:34008].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15736 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-09 10:16:20 +00:00
drbrain 74a1543645 Restore missing line to RDoc::Generator#params. Patch by Lincoln Stoll.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15735 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-09 04:52:53 +00:00
akr 861219ce4a fix doc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15734 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-09 01:04:46 +00:00
drbrain 0d3f9dbfe1 * lib/rdoc/code_objects.rb: Remove debugging Kernel#p. Patch by Lincoln Stoll
<lstoll at lstoll.net>
* lib/rdoc/generator/html.rb: Fully qualify AllReferences.  Patch by Lincoln
  Stoll <lstoll at lstoll.net>
* lib/rdoc/ri/writer.rb: Fix 1.8 backwards compatibility.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15733 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-09 00:59:23 +00:00
nobu 31b604a3f3 * file.c (isdirsep): backslash is valid path separator on cygwin too.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15732 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-08 09:51:00 +00:00
naruse a39feece85 * string.c (search_nonascii): Use VALUE instead of unsigned long
because VALUE can be the fastest unsigned integer type.
  On LLP64 unsigned long isn't the fastest.
* string.c (str_strlen): ditto.
* string.c (str_utf8_nth): ditto.
* string.c (count_utf8_lead_bytes_with_ulong): ditto.

* string.c (count_utf8_lead_bytes_with_word): renamed.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15731 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-08 09:05:34 +00:00
akr b7d7519b18 add a test for [ruby-dev:34006].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15730 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-08 06:10:22 +00:00
akr 6f8d578b8a code duplication removed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15729 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-08 05:56:03 +00:00
mame fddbc2738f * bignum.c: fix indent.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15728 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-07 12:28:57 +00:00
mame a6267179ee * bignum.c (power_cache_init, power_cache_get_power0, Init_Bignum):
delayed initializing power cache per base.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15727 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-07 12:14:17 +00:00
nobu 2bbf4707f7 * cont.c (cont_restore_0): fixed typo. [ruby-core:15821]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15726 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-07 11:30:07 +00:00
nobu 983aea463f * lib/mkmf.rb: rdoc added. [ruby-Patches-9762]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15725 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-07 10:56:13 +00:00
usa 643d2bad07 * 2008-03-07
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15724 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-07 10:22:10 +00:00
akr 7a23e86588 fix rdoc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15723 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-07 10:18:18 +00:00
akr 67151cd7af update sprintf rdoc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15722 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-07 08:31:41 +00:00
akr fbe88bb213 update sprintf rdoc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15721 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-06 15:46:18 +00:00
nobu ec2205b205 * sprintf.c (rb_str_format): space flag is in effect for Inf/NaN too.
[ruby-dev:34002]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15720 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-06 08:26:55 +00:00
akr fe2a671fdb add a test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15719 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-06 08:04:18 +00:00
akr 7b8d61c2ed use %ld for VALUE in rp.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15718 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-06 06:50:41 +00:00
usa c1e0cb08f2 * test_sprintf.rb (test_integer): add some cases.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15717 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-06 06:48:15 +00:00
usa ed6b1829ba * sprintf.c (rb_str_format): casting double to long is undefined
if the interger part of double is out of the range of long.
	  (fix previous commit).



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15716 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-06 06:44:41 +00:00
akr 774aebb3ce follow RFloat member name change.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15715 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-06 06:40:56 +00:00
akr 7a62e3ea59 add a test for [ruby-dev:34002].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15714 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-06 06:21:07 +00:00
usa 16d0ad4899 * sprintf.c (rb_str_format): casting double to long is undefined
if the interger part of double is out of the range of long.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15713 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-06 06:20:48 +00:00
nobu 591503c0ab * sprintf.c (rb_str_format): ignore 0 flag for NaN and Inf.
[ruby-dev:33994]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15711 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-06 06:11:43 +00:00
usa 6aac0579d1 * {bcc32,win32}/Makefile.sub (RUNRUBY): use $(PROGRAM) instead of
ruby$(EXEEXT). 
	  suggested by KIMURA Koichi <kimura.koichi at canon.co.jp>.
	  [ruby-dev:34000]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15709 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-06 06:08:37 +00:00
akr d1cd806372 * missing/lgamma_r.c (loggamma): return 0 for 1 and 2.
* test/ruby/test_math.rb: accept errors by functions under missing/.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15708 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-06 05:53:03 +00:00
naruse d2797c33bd * transcode.c (rb_str_transcode_bang): set coderange.
* transcode.c (rb_str_transcode): use rb_str_transcode_bang.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15707 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-06 05:30:48 +00:00
akr be36a1b138 * include/ruby/missing.h (cbrt): add declaration.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15706 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-06 05:06:30 +00:00
nobu 53577db05b * misc/ruby-mode.el (ruby-add-log-current-method): use ruby style
method name format.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15704 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-06 02:14:17 +00:00
nobu 6b10829b22 * sprintf.c (rb_str_format): no need of loop.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15703 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-06 02:12:31 +00:00
matz bececd35c5 * object.c (rb_mod_freeze): call rb_class_name() directly.
[ruby-core:15802]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15702 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-06 01:33:56 +00:00
naruse 98cbcf1bd7 * string.c (count_utf8_lead_bytes_with_ulong): fix shift size.
[ruby-dev:33993]

* string.c (str_utf8_nth) fix wrong counting.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15700 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-05 19:34:15 +00:00
akr 579f16d985 add tests for float format.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15699 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-05 16:24:09 +00:00
nobu 8c889459cf * sprintf.c (rb_str_format): size_t returned from strlen() can be
unsigned.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15697 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-05 15:34:02 +00:00
nobu 79cdf2ffa2 * struct.c (make_struct): preserve encoding of struct name.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15696 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-05 15:31:42 +00:00
naruse fff981ee6d * string.c (is_utf8_lead_byte, count_utf8_lead_bytes_with_ulong):
defined for UTF-8 optimization.

* string.c (str_strlen): use is_utf8_lead_byte and
  count_utf8_lead_bytes_with_ulong.

* string.c (str_utf8_nth) ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15695 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-05 13:54:36 +00:00
akr e34480c330 add a test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15694 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-05 13:31:06 +00:00
nobu 12551ae573 * file.c (rb_file_flock): returns false on EAGAIN if non-blocking.
[ruby-core:15795]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15693 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-05 08:53:08 +00:00
duerst 08631278ad Web Mar 5 17:43:43 2008 Martin Duerst <duerst@it.aoyama.ac.jp>
* transcode.c (transcode_loop): Adjusted detection of invalid
	  (ill-formed) UTF-8 sequences. Fixing potential security issue, see
	  http://www.unicode.org/versions/Unicode5.1.0/#Notable_Changes.

	* test/ruby/test_transcode.rb: Added two tests for above fix.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15692 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-05 08:45:51 +00:00
matz 39787ea14d * numeric.c (fix_to_s): avoid rb_scan_args() when no argument
given. 
* bignum.c (rb_big_to_s): ditto.
* enum.c (enum_first): ditto.
* eval_jump.c (rb_f_catch): ditto.
* io.c (rb_obj_display): ditto.
* class.c (rb_obj_singleton_methods): ditto.
* object.c (rb_class_initialize): ditto.
* random.c (rb_f_srand): ditto.
* range.c (range_step): ditto.
* re.c (rb_reg_s_last_match): ditto.
* string.c (rb_str_to_i): ditto.
* string.c (rb_str_each_line): ditto.
* string.c (rb_str_chomp_bang): ditto.
* string.c (rb_str_sum): ditto.

* string.c (str_modifiable): declare inline.
* string.c (str_independent): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15691 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-05 05:22:17 +00:00
matz 413db1b036 * lib/debug.rb: require 'continuation' to implement "restart"
command.  [ruby-dev:33992]

* lib/debug.rb (Context::debug_command): remove local variable
  shadowing to shut up warnings.  [ruby-dev:33992]

* lib/debug.rb (Context::display_list): ditto.

* lib/debug.rb (Context::resume): ditto.

* lib/debug.rb (Context::get_thread): no longer use #index for Hash.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15690 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-05 02:52:43 +00:00
matz 772c19298d * lib/irb.rb (IRB::Irb::eval_input): SyntaxError should not be
considered as IRB bug.  [ruby-dev:33991]

* lib/irb/workspace.rb (IRB::WorkSpace::filter_backtrace): should
  filter 'irb.rb' as well for context mode 2 and 3.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15689 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-04 12:37:05 +00:00
matz a110ef359a * hash.c (hash_equal): two hash tables are different when internal
comparison table differ.  [ruby-dev:33989]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15688 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-04 10:19:55 +00:00
matz f8c5b8ec90 * hash.c (rb_hash_aset): should not copy key string when
compare_by_identity is set.  [ruby-dev:33604]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15687 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-04 10:14:40 +00:00
matz 6c76a2577a * parse.y (parser_yylex): disallow non digits '0o' expression.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15686 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-04 07:29:38 +00:00
naruse 70b55c5dcf * io.c (open_key_args): use rb_io_open_with_args instead of rb_f_open.
[ruby-core:15763]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15685 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-04 05:36:08 +00:00
akr 8e1d6b214a * gc.c (add_heap): fix previous change. [ruby-dev:33988]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15684 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-04 04:42:31 +00:00
nobu fd847f79a0 * gc.c (add_heap): use binary search to find the place to insert the
new heap slot.  [ruby-dev:33983]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15683 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-04 01:21:06 +00:00
naruse 8ac9b7c2ed * io.c (open_key_args): use rb_io_open instead of rb_f_open.
[ruby-core:15746]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15682 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-03 20:34:58 +00:00