summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2007-08-25* encoding.c: provide basic features for M17N.matz
* parse.y: encoding aware parsing. * parse.y (pragma_encoding): encoding specification pragma. * parse.y (rb_intern3): encoding specified symbols. * string.c (rb_str_length): length based on characters. for older behavior, bytesize method added. * string.c (rb_str_index_m): index based on characters. rindex as well. * string.c (succ_char): encoding aware succeeding string. * string.c (rb_str_reverse): reverse based on characters. * string.c (rb_str_inspect): encoding aware string description. * string.c (rb_str_upcase_bang): encoding aware case conversion. downcase, capitalize, swapcase as well. * string.c (rb_str_tr_bang): tr based on characters. delete, squeeze, tr_s, count as well. * string.c (rb_str_split_m): split based on characters. * string.c (rb_str_each_line): encoding aware each_line. * string.c (rb_str_each_char): added. iteration based on characters. * string.c (rb_str_strip_bang): encoding aware whitespace stripping. lstrip, rstrip as well. * string.c (rb_str_justify): encoding aware justifying (ljust, rjust, center). * string.c (str_encoding): get encoding attribute from a string. * re.c (rb_reg_initialize): encoding aware regular expression * sprintf.c (rb_str_format): formatting (i.e. length count) based on characters. * io.c (rb_io_getc): getc to return one-character string. for older behavior, getbyte method added. * ext/stringio/stringio.c (strio_getc): ditto. * io.c (rb_io_ungetc): allow pushing arbitrary string at the current reading point. * ext/stringio/stringio.c (strio_ungetc): ditto. * ext/strscan/strscan.c: encoding support. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13261 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-25test assignment order.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13260 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-25* cont.c: separate Continuation and Fiber from core.ko1
* ext/continuation/*, ext/fiber/*: ditto. * include/ruby/ruby.h: remove rb_cFiber. * include/ruby/intern.h: add the rb_fiber_new() declaration. * enumerator.c (next_init): fix to use rb_fiber_new(). * test/ruby/test_enumerator.rb: remove next? tests. * test/ruby/test_continuation.rb: add a require 'continuation'. * test/ruby/test_fiber.rb: add a require 'fiber'. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13259 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-25* common.mk (prelude.o): depends on vm_core.h now.nobu
* common.mk (prelude.c): depends on tool/compile_prelude.rb too. * common.mk (prereq): updates all auto-generated sources. * tool/compile_prelude.rb: separated dynamic and static portions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13258 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-25* prelude.rb: add Thread.exclusive. This class methodko1
is different from 1.8's. Thread.exclusive only does synchronize with VM global mutex. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13257 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-25* array.c (rb_ary_s_try_convert): more document description.matz
* re.c (rb_reg_s_try_convert): typo fixed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13256 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-24* id.h, id.c: remove idFuncall.ko1
* compile.c (iseq_specialized_instruction): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13255 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-24* tool/compile_prelude.rb: fix to include "vm_core.h".ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13254 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-24* test/ruby/sentence.rb (Sentence): include Enumerable.akr
(Sentence#each): defined. * test/ruby/test_assignment.rb: use Sentence#expand. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13253 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-24* prelude.rb: fix Mutex#synchronize definition.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13252 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-24* array.c (rb_ary_s_try_convert): a new class method to convertmatz
object or nil if it's not target-type. this mechanism is used to convert types in the C implemented methods. * hash.c (rb_hash_s_try_convert): ditto. * io.c (rb_io_s_try_convert): ditto. * re.c (rb_reg_s_try_convert): ditto. * string.c (rb_str_s_try_convert): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13251 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-24* benchmark/bm_loop_generator.rb: added.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13250 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-24* added lex.c and prelude.c to svn:ignore.shugo
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13249 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-24* set svn:ignore to ext/json and ext/probeprofiler.shugo
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13248 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-24* prelude.rb: added. run this script on startup.ko1
* tool/compile_prelude.rb: compile prelude.rb to C string. (prelude.rb -> prelude.c) * common.mk: fix to build with prelude.c. * inits.c (rb_call_inits): ditto. * thread.c (Init_Thread): move definition of Mutex#synchronize to prelude.rb. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13247 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-24* compile.c (compile_massign_opt): fix to skip massign optimizationko1
with global variables. * bootstraptest/test_massign.rb: add some tests for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13246 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-24* enumerator.c (enumerator_next): stop pre-fetching.matz
* enumerator.c (Init_Enumerator): remove next? method. * eval.c (rb_f_loop): now handles StopIteration exception. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13245 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-24* test/ruby/test_dir.rb (TestDir::setup): ?c now makes a string.matz
* lib/test/unit/autorunner.rb (Test::Unit::AutoRunner::initialize): initialize @workdir to stop warning. * lib/drb/drb.rb (DRb::DRbServer::InvokeMethod::perform_without_block): replace funcall by send!. other files in the distribution as well. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13244 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-24* eval.c (rb_f_send_bang): abandon the name funcall for privatematz
aware method call. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13243 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-23* compile.c: optimize simple massign.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13242 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-23* ext/win32ole/win32ole.c (reg_get_value): use RegQueryValueEx insteadsuke
of RegQueryValueEx. * ext/win32ole/win32ole.c (typelib_file_from_clsid): fix the bug that the function always returns Qnil. * test/win32ole/test_win32ole_type.rb (test_initialize): add some test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13241 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-23* configure.in (group_member): check if presents.nobu
* configure.in (XCFLAGS): add _GNU_SOURCE on linux. * file.c (group_member): use system routine if available. * process.c: moved _GNU_SOURCE macro to Makefile. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13240 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-23* compile.c (compile_massign), insnhelper.ci (vm_throw): not use C99nobu
comment. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13239 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-23* enumerator.c (sym_call): initialize first.nobu
* enumerator.c (enum_iter): typedefed. * enumerator.c (next_i): suppress a warning. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13238 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-23* cont.c (rb_cont_call, fiber_switch, rb_fiber_resume, rb_fiber_yield):nobu
suppress warnings. * cont.c (rb_fiber_start): change on non-volatile variable between setjmp and longjmp may not has an effect. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13237 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-23* compile.c, insns.def, parse.y: fix massign order. This changeko1
causes performance problem. Try vm1_swap benchmark. [ruby-dev:31522] * insns.def, insnhelper.ci: move process body of expandarray insn to vm_expandarray(). * bootstraptest/test_knownbug.rb, bootstraptest/test_massign.rb: move a solved test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13236 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-23* parse.y (f_norm_arg): ripper has no shadowing check.nobu
* parse.y (f_block_arg): dispatch blkarg_mark. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13235 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-23* compile.c (make_masgn_lhs, iseq_compile_each): fixed indent.nobu
* compile.c (iseq_translate_threaded_code), vm_evalbody.ci (get_insns_address_table), template/vmtc.inc.tmpl (insns_address_table): constified. * vm_evalbody.ci (vm_eval), template/insns_info.inc.tmpl (insn_stack_increase, insn_ret_num): suppress warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13234 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-23* parse.y (f_norm_arg): check also nested arguments. [ruby-dev:31502]nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13233 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-22* util.c: updated for ANSI C only. applied a patch frommatz
<snakagawa AT infoteria.co.jp>. [ruby-dev:31591] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13232 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-22* missing/strtod.c: removed. [ruby-dev:31588]matz
* LEGAL: updated. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13231 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-22test for [ruby-dev:31592].akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13230 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-22* bootstraptest/test_knownbug.rb:ko1
fix typo of filename (test_knwonbug.rb). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13229 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-22* bootstraptest/test_knwonbug.rb: added. This file will containko1
test cases which point out known bug. If bug is fixed, tests should move to the suitable place. * bootstraptest/test_massign.rb: move a test which show known bug to test_knownbug.rb. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13228 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-22* bootstraptest/runner.rb (in_temporary_working_directory):akr
don't remove the directory specified by --dir. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13227 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-22add test for [ruby-dev:31522].akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13226 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-21* util.c (ruby_strtod): replaced by the implementation by Davidmatz
M. Gay inspired by William D. Clinger's paper "How to Read Floating Point Numbers Accurately" [Proc. ACM SIGPLAN '90, pp. 92-101]. a patch from Satoshi Nakagawa <snakagawa AT infoteria.co.jp>. [ruby-dev:31582] * test/ruby/test_float.rb (TestFloat::test_float): add test for precision. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13131 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-21* cont.c: add Fiber#resume and Fiber.yield.ko1
and Fiber::Core class to realize Coroutine. * include/ruby/intern.h: declare rb_fiber_yield(), rb_fiber_resume(), * enumerator.c: use above api. * test/ruby/test_fiber.rb: fix and add tests for above changes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13130 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-21* lib/tmpdir.rb (Dir.mktmpdir): make directory suffix specifiable.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13129 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-21* st.c (st_clear): reset num_entries too.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13128 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-21* hash.c (st_foreach_func, rb_foreach_func): typedefed.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13127 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-21* st.c (rehash): suppress warnings.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13126 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-21* hash.c (rb_hash_clear): use st_clear() unless iterating.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13125 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-21* st.c (struct st_table_entry): add new members, fore and back, tonobu
iterate in inserted order. * include/ruby/st.h (struct st_table): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13124 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-20* benchmark/bm_vm2_case.rb: add a new benchmark.ko1
YARV optimize case/when syntax. If every conditions are literal (such as Symbol, Fixnum, String), dispatch calc order will be O(1). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13123 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-20* test/ruby/test_enumerator.rb: fix last commit.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13122 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-20* test_enumerator.rb (enum_test): fix to return sortedko1
array (for Hash test). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13121 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-20* enumerator.c (next_i): fix to return with Fiber#yield atko1
the end of each block. [ruby-dev:31470] * enumerator.c (enumerator_next_p): call init_next if not initialized. [ruby-dev:31514] * test/ruby/test_enumerator.rb: add tests for Enumerator. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13120 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-20* io.c (rb_io_s_foreach): argument count check before makingmatz
Enumerator. [ruby-dev:31525] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13119 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-20* dir.c (dir_foreach): return Enumerator if no block given.matz
[ruby-dev:31525] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13118 b2dd03c8-39d4-4d8f-98ff-823fe69b080e