aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* * thread.c: fix Mutex to be interruptable lock.ko12007-08-2720-95/+363
| | | | | | | | | | | | | | | | | | | * thread_win32.ci, thread_win32.h, thread_pthread.ci, thread_pthread.h: prepare native_cond_*() which are based on pthread_cond_*() spec. * prelude.rb: fix Mutex#synchronize method. * vm_core.h, include/ruby/intern.h: change unblock function interface (to pass some user data). * file.c, process.c: ditto. * benchmark/bm_vm2_mutex.rb: add a benchmark for mutex. * benchmark/bm_vm3_thread_mutex.rb: add a benchmark for mutex with contension. * benchmark/run.rb: fix to remove ENV['RUBYLIB'] for matzruby. * test/ruby/test_thread.rb: add a test. * common.mk: fix benchmark options. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13290 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * string.c (rb_str_each_line): should swallow sequence of newlinesmatz2007-08-272-1/+10
| | | | | | if rs (optional argument) is an empty string. [ruby-dev:31652] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13289 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * string.c (rb_str_rstrip_bang): wrong strip point. [ruby-dev:31652]matz2007-08-272-2/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13288 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * encoding.c (rb_enc_codelen): raises invalid sequence exceptionmatz2007-08-273-2/+31
| | | | | | | | if ONIGENC_CODE_TO_MBCLEN() returns zero. [ruby-dev:31661] * encoding.c (rb_enc_mbclen): check invalid sequence. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13287 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/win32ole/win32ole.c (ole_type_progid): fix the bug.suke2007-08-273-6/+10
| | | | | | | | | | [ruby-dev:31576] * test/win32ole/test_win32ole_type.rb (test_initialize): remove duplicate assertions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13286 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/etc/etc.c (etc_getlogin): update documentation to notematz2007-08-272-0/+7
| | | | | | security issue. [ruby-Bugs-11821] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13284 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * string.c (sym_encoding): return the encoding of a Symbol.nobu2007-08-272-1/+11
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13283 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * util.c (IEEE_BIG_ENDIAN): use configured value. [ruby-dev:31623]nobu2007-08-272-37/+47
| | | | | | | * util.c (Llong): set to LONG_LONG if available. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13282 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * string.c (tr_trans): wrong condition for mbmaxlen==1 strings.matz2007-08-272-4/+10
| | | | | | [ruby-dev:31652] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13281 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (rb_io_each_byte): caused infinite loop. [ruby-dev:31652]matz2007-08-264-8/+22
| | | | | | | | | | | | | * io.c (rb_io_getc): should return nil at EOF, not EOFError. * lib/delegate.rb (SimpleDelegator::__setobj__): use raise argument to specify backtrace. * test/ruby/test_fnmatch.rb (TestFnmatch::bracket_test): String#include? no longer works for Fixnum. use #chr. [ruby-dev:31652] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13280 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enumerator.c (enumerator_next): message changed.matz2007-08-263-4/+8
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13279 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * cont.c: fix to remove Fiber.new until fiber.so is not loaded.ko12007-08-263-11/+23
| | | | | | | | * test/ruby/test_continuation.rb: fix to use resume. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13278 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/win32ole/win32ole.c (ole_wc2mb, reg_enum_key): allocate suke2007-08-252-3/+10
| | | | | | | buffer should be NULL terminated. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13277 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * insnhelper.ci (vm_setup_method): reorder code for branch prediction.ko12007-08-252-15/+19
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13276 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * insnhelper.ci (vm_call_method): fix to relaxant safe level checkko12007-08-253-81/+136
| | | | | | | | | ($SAFE > 2). [ruby-core:11998] * bootstraptest/test_method.rb: add tests for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13275 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_fiber.rb: fix to require 'continuation'.ko12007-08-252-0/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13274 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/encoding.h: remove unused rb_enc_ismbchar().matz2007-08-253-5/+7
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13273 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/win32ole/win32ole.c (ole_event_free, EVENTSINK_Destructor,suke2007-08-252-31/+15
| | | | | | | | fev_initialize): remove the connection ole_event_free and EVENTSINK_Destructor. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13272 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * string.c, include/ruby/intern.h: export rb_str_length().ko12007-08-254-5/+12
| | | | | | | | * insns.def: use rb_str_lengt() in opt_length. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13271 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * cont.c: rename FIBER_STACK_SIZE to FIBER_VM_STACK_SIZE.ko12007-08-252-2/+7
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13270 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/encoding.h (rb_enc_str_new): prototype added.nobu2007-08-252-1/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13269 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * string.c (rb_str_splice): return from void funtion.nobu2007-08-252-4/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13268 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y, re.c: re-applied revision 13092.nobu2007-08-253-24/+33
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13267 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * typo fixed (analysys -> analysis)nahi2007-08-251-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13266 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (swallow): removed condition using an unset variable.nobu2007-08-252-7/+13
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13265 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* include/ruby/encoding.h: added.matz2007-08-251-0/+79
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13264 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* encoding.c: added.matz2007-08-251-0/+229
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13263 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* add test for [ruby-dev:31507].akr2007-08-251-1/+8
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13262 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * encoding.c: provide basic features for M17N.matz2007-08-25113-752/+1423
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* test assignment order.akr2007-08-251-2/+11
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13260 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * cont.c: separate Continuation and Fiber from core.ko12007-08-2512-40/+83
| | | | | | | | | | | | | | * 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
* * common.mk (prelude.o): depends on vm_core.h now.nobu2007-08-253-8/+23
| | | | | | | | | | | * 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
* * prelude.rb: add Thread.exclusive. This class methodko12007-08-252-0/+17
| | | | | | | | | 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
* * array.c (rb_ary_s_try_convert): more document description.matz2007-08-253-3/+18
| | | | | | * 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
* * id.h, id.c: remove idFuncall.ko12007-08-244-6/+13
| | | | | | | | * compile.c (iseq_specialized_instruction): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13255 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * tool/compile_prelude.rb: fix to include "vm_core.h".ko12007-08-242-3/+13
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13254 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/sentence.rb (Sentence): include Enumerable.akr2007-08-243-55/+77
| | | | | | | | | (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
* * prelude.rb: fix Mutex#synchronize definition.ko12007-08-242-7/+9
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13252 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c (rb_ary_s_try_convert): a new class method to convertmatz2007-08-246-0/+103
| | | | | | | | | | | | | | | 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
* * benchmark/bm_loop_generator.rb: added.ko12007-08-242-0/+18
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13250 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * added lex.c and prelude.c to svn:ignore.shugo2007-08-240-0/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13249 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * set svn:ignore to ext/json and ext/probeprofiler.shugo2007-08-240-0/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13248 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * prelude.rb: added. run this script on startup.ko12007-08-246-6/+60
| | | | | | | | | | | | | * 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
* * compile.c (compile_massign_opt): fix to skip massign optimizationko12007-08-244-6/+18
| | | | | | | | | 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
* * enumerator.c (enumerator_next): stop pre-fetching.matz2007-08-244-45/+36
| | | | | | | | * 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
* * test/ruby/test_dir.rb (TestDir::setup): ?c now makes a string.matz2007-08-2412-22/+35
| | | | | | | | | | * 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
* * eval.c (rb_f_send_bang): abandon the name funcall for privatematz2007-08-248-30/+35
| | | | | | aware method call. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13243 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * compile.c: optimize simple massign.ko12007-08-232-10/+84
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13242 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/win32ole/win32ole.c (reg_get_value): use RegQueryValueEx insteadsuke2007-08-233-25/+80
| | | | | | | | | | | | | 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
* * configure.in (group_member): check if presents.nobu2007-08-234-4/+16
| | | | | | | | | | | * 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