usa
70f5d818f8
* regenc.h: check RUBY_EXTERN before including config.h and defines.h
...
* common.mk: update header dependency.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13320 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-30 10:42:09 +00:00
nobu
7d4ee1d235
* proc.c (rb_obj_define_method): reverted. [ruby-talk:266637]
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13319 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-30 05:06:52 +00:00
nobu
18c9e590c3
* lib/mkmf.rb: initialize $top_srcdir always. [ruby-dev:31682]
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13318 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-30 04:49:27 +00:00
nobu
10084a3e61
* lib/mkmf.rb (try_const, have_const): check for a const is defined.
...
[ruby-core:04422]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13317 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-30 04:13:16 +00:00
nobu
b58f080349
* string.c (tr_trans, rb_str_squeeze_bang, rb_str_split_m): suppress
...
warnings.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13315 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-30 02:44:20 +00:00
akr
c8b8b7438e
add comment.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13314 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-30 01:54:51 +00:00
akr
2b18d1ee8e
* hash.c (hash_alloc0, hash_alloc): unified because hash_alloc doesn't
...
allocate st_table now.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13313 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-30 00:41:24 +00:00
akr
1591776d46
forgot to modify
...
ext/json/ext/parser/parser.rl and
ext/tk/tkutil/tkutil.c.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13312 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-29 23:38:38 +00:00
akr
eee95e67b9
enclose RHASH_XXX macros by parenthesis.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13310 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-29 23:16:55 +00:00
akr
2a4c4f7b0c
* include/ruby/intern.h: declare rb_hash_tbl.
...
* include/ruby/ruby.h (RHash): delay st_table allocation.
rename tbl field to ntbl to detect direct reference to the st_table
as a compile error.
(RHASH_TBL): abstract accessor defined.
(RHASH_ITER_LEV): ditto.
(RHASH_IFNONE): ditto.
(RHASH_SIZE): ditto.
(RHASH_EMPTY_P): ditto.
* hash.c: delay st_table allocation.
* gc.c: replace tbl by ntbl.
* array.c: replace direct field accessor by abstract field accessor
such as RHASH(hash)->tbl to RHASH_TBL(hash).
* marshal.c: ditto.
* insns.def: ditto.
* ext/iconv/iconv.c: ditto.
* ext/json/ext/generator/generator.c: ditto.
* ext/json/ext/parser/parser.c: ditto.
* ext/syck/rubyext.c: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13309 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-29 23:12:21 +00:00
matz
3d7f8c2320
* string.c (str_gsub): should not use mbclen2() which has broken API.
...
* re.c: remove rb_reg_mbclen2().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13308 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-29 19:16:02 +00:00
akr
24385e708e
* lib/open-uri.rb: add :ftp_active_mode option.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13307 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-29 09:38:36 +00:00
akr
089cfabaf0
add test for [ruby-dev:31609].
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13306 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-29 06:54:56 +00:00
nobu
2656b0545e
* parse.y (aref_args): args may not be a list. [ruby-dev:31592]
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13301 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-29 03:48:19 +00:00
nobu
69099d3e69
* re.c (rb_reg_mbclen2): suppress a warning.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13300 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-29 03:19:00 +00:00
akr
167358d000
* include/ruby/st.h (struct st_table): add entries_packed 1-bit
...
bitfield. decrease num_bins 1-bit.
* st.c: pack numhash which have 5 or less entries in bins.
(st_init_table_with_size): setup entries_packed flag.
(st_clear): support packed mode.
(st_lookup): ditto.
(st_insert): ditto.
(st_add_direct): ditto.
(st_copy): ditto.
(st_delete): ditto.
(st_foreach): ditto.
(st_reverse_foreach): ditto.
(unpack_entries): new function for converting to unpacked mode.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13299 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-29 02:36:54 +00:00
matz
3783246a2e
* include/ruby/defines.h (flush_register_windows): call "ta 0x03"
...
even on Linux/Sparc. [ruby-dev:31674]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13298 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-29 02:15:03 +00:00
suke
41585e424b
* ext/win32ole/win32ole.c (ole_type_progid): progid getted by
...
ProgIDFromCLSID should be freed by CoTaskMemFree. Thanks, arton.
* test/win32ole/test_win32ole.rb (test_raise_message): set negative
compareMode value to raise WIN32OLERuntimeError.
* test/win32ole/test_win32ole_type.rb (test_implemented_ole_types):
support some environment which returns IShellDispatch5 instead
of IShellDispatch.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13296 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-28 10:23:31 +00:00
matz
51b4cc11d1
* string.c (rb_str_subseq): retrieve substring based on byte offset.
...
* string.c (rb_str_rindex_m): was confusing character offset and
byte offset.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13295 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-28 06:45:32 +00:00
nobu
01c24a2f78
* test/ruby/test_string.rb (test_splice!): tests for [ruby-dev:31665].
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13294 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-28 06:19:11 +00:00
nobu
53635dea12
* string.c (rb_str_splice_0): should check to modify. [ruby-dev:31665]
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13293 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-28 05:23:33 +00:00
nobu
38b1f98a72
* parse.y (parser_prepare): set parser encode too when BOM exists.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13292 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-28 05:21:48 +00:00
ko1
88f13dfc72
remove conflict sign.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13291 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-27 16:52:23 +00:00
ko1
6244e502cc
* thread.c: fix Mutex to be interruptable lock.
...
* 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
2007-08-27 16:48:14 +00:00
matz
51fb5511e0
* string.c (rb_str_each_line): should swallow sequence of newlines
...
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
2007-08-27 14:32:15 +00:00
matz
9166bd2bc9
* string.c (rb_str_rstrip_bang): wrong strip point. [ruby-dev:31652]
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13288 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-27 14:17:28 +00:00
matz
4461bd2f1f
* encoding.c (rb_enc_codelen): raises invalid sequence exception
...
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
2007-08-27 13:48:09 +00:00
suke
a1a618ead1
* ext/win32ole/win32ole.c (ole_type_progid): fix the bug.
...
[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
2007-08-27 11:38:29 +00:00
matz
fd618e2234
* ext/etc/etc.c (etc_getlogin): update documentation to note
...
security issue. [ruby-Bugs-11821]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13284 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-27 10:15:18 +00:00
nobu
3ca07d8718
* string.c (sym_encoding): return the encoding of a Symbol.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13283 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-27 06:56:49 +00:00
nobu
d4b9e9815b
* util.c (IEEE_BIG_ENDIAN): use configured value. [ruby-dev:31623]
...
* 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
2007-08-27 06:33:12 +00:00
matz
fa02a6cedd
* string.c (tr_trans): wrong condition for mbmaxlen==1 strings.
...
[ruby-dev:31652]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13281 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-27 04:51:45 +00:00
matz
1a0b7d0fb6
* io.c (rb_io_each_byte): caused infinite loop. [ruby-dev:31652]
...
* 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
2007-08-26 17:22:26 +00:00
matz
98d6d636e3
* enumerator.c (enumerator_next): message changed.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13279 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-26 16:33:45 +00:00
ko1
d55c0f5382
* cont.c: fix to remove Fiber.new until fiber.so is not loaded.
...
* 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
2007-08-26 03:31:20 +00:00
suke
71e6011d63
* ext/win32ole/win32ole.c (ole_wc2mb, reg_enum_key): allocate
...
buffer should be NULL terminated.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13277 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-25 21:57:46 +00:00
ko1
2ca7ad139f
* insnhelper.ci (vm_setup_method): reorder code for branch prediction.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13276 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-25 21:05:20 +00:00
ko1
343c363d5b
* insnhelper.ci (vm_call_method): fix to relaxant safe level check
...
($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
2007-08-25 20:56:51 +00:00
ko1
cf16f0de0f
* test/ruby/test_fiber.rb: fix to require 'continuation'.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13274 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-25 20:54:50 +00:00
matz
1ba65ebfe9
* include/ruby/encoding.h: remove unused rb_enc_ismbchar().
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13273 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-25 15:27:08 +00:00
suke
890eb07370
* ext/win32ole/win32ole.c (ole_event_free, EVENTSINK_Destructor,
...
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
2007-08-25 14:01:08 +00:00
ko1
5ba27573a0
* string.c, include/ruby/intern.h: export rb_str_length().
...
* 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
2007-08-25 08:54:29 +00:00
ko1
c2a734ea99
* cont.c: rename FIBER_STACK_SIZE to FIBER_VM_STACK_SIZE.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13270 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-25 08:51:59 +00:00
nobu
2d888a8f33
* include/ruby/encoding.h (rb_enc_str_new): prototype added.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13269 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-25 08:05:08 +00:00
nobu
10f56f8fd0
* string.c (rb_str_splice): return from void funtion.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13268 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-25 07:14:01 +00:00
nobu
c456863bd6
* parse.y, re.c: re-applied revision 13092.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13267 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-25 07:06:47 +00:00
nahi
7eeabe2f58
* typo fixed (analysys -> analysis)
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13266 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-25 06:34:28 +00:00
nobu
8bbac3ba77
* io.c (swallow): removed condition using an unset variable.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13265 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-25 06:20:48 +00:00
matz
000b6e22f4
include/ruby/encoding.h: added.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13264 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-25 04:14:26 +00:00
matz
5678ab5182
encoding.c: added.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13263 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-25 04:07:20 +00:00