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

521 Коммитов

Автор SHA1 Сообщение Дата
usa 4e389756ec * win32/{setup.mak,Makefile.sub,win32.c},include/ruby/win32.h (RT_VER):
split compiler specification and runtime library specification.

* win32/Makefile.sub (LD_SHARED*, config.status): no need to embbed
  manifest if not exist.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25173 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-01 05:19:19 +00:00
akr 18a07e9d4b * include/ruby/intern.h (rb_struct_iv_get): deprecated because it is
not used and access internal structure.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25159 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-29 13:25:54 +00:00
naruse f7554133b2 * encoding.c (rb_enc_unicode_p): defined.
Returns 1 when the encoding is Unicode series
  other than UTF-7 else 0.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25142 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-29 00:34:00 +00:00
naruse e0af046ad0 * hash.c (rb_f_getenv): use rb_filesystem_str_new_cstr
instead of rb_str_new2.
  ENV['PATH'].encoding should be Filesystem Encoding
  because its content is related to filesystem.
  see [ruby-dev:39393]

* hash.c (env_fetch): ditto.

* string.c (rb_filesystem_str_new): defined.

* string.c (rb_filesystem_str_new_cstr): ditto.

* include/ruby/intern.h (rb_filesystem_str_new): added.

* include/ruby/intern.h (rb_filesystem_str_new_cstr): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25139 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-28 19:24:18 +00:00
naruse ff504d3cc9 * include/ruby/st.h: include inttypes.h and stdint.h.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25138 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-28 19:24:10 +00:00
duerst 9d7e47114c include/ruby/st.h: aligned prototype of st_hash_uint32 with function
definition (fixing compiling problem on cygwin)

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25132 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-28 10:08:46 +00:00
nobu f2103ee4a9 * st.c: moved murmur hash from string.c. [ruby-dev:39376]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25106 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-26 14:29:13 +00:00
nobu f23486592a * include/ruby/intern.h (rb_hash_{start,uint32,uint,end}): fixed
prototypes.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25099 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-26 07:26:46 +00:00
usa d70e9a5568 * win32/win32.c, include/ruby/win32.h (rb_w32_access): new function to
replace MSVCRT's access().
  [ruby-core:25761]

* file.c (eaccess): workaround for recent MSVCRT is no longer needed.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25092 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-25 07:04:25 +00:00
nobu 21367ae077 * include/ruby/ruby.h (rb_type): forward declaration to suppress a
warning.  a patch from Naohisa Goto at [ruby-dev:39350]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25003 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-18 15:02:21 +00:00
nobu d36c76dc71 * common.mk (eval.o): needs vm.h.
* eval.c (ruby_cleanup): destruct current VM before exit.

* gc.c (rb_objspace_free): free object space.

* vm.c (ruby_vm_destruct): destruct and free VM struct.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25000 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-18 07:29:17 +00:00
marcandre 1796522f10 * thread.c (rb_exec_recursive_outer, rb_exec_recursive): Added method to short-circuit to the outermost level in case of recursion
* test/ruby/test_thread.rb (test_recursive_outer): Test for above

* hash.c (rb_hash_hash): Return a sensible hash for in case of recursion [ruby-core:24648]

* range.c (rb_range_hash): ditto

* struct.c (rb_struct_hash): ditto

* array.c (rb_array_hash): ditto

* test/ruby/test_array.rb (test_hash2): test for above

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24943 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-15 21:30:50 +00:00
nobu 4f041dafbe * debug.c, parse.y: fixed types.
* node.h (nd_line): limit to int.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24924 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-14 07:39:16 +00:00
nobu e4259b7cc5 * include/ruby/ruby.h (RB_TYPE_P): should not use BUILTIN_TYPE for
special constants.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24919 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-14 01:44:48 +00:00
usa d8e8849e35 * include/ruby/ruby.h (NUM2INT, NUM2LL, INT2NUM, UINT2NUM),
(LONG2NUM, ULONG2NUM, NUM2CHR): get rid of backward references of
  macros.  the code couldn't compile by VC.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24917 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-14 01:01:19 +00:00
nobu 231fdd86ae * configure.in (XLDFLAGS): link startup code with ObjC support.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24894 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-13 09:48:45 +00:00
nobu df3ae4e2b5 * include/ruby/ruby.h (rb_special_const_p): fixed typo.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24889 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-13 03:10:24 +00:00
nobu 8d0bcdb016 * include/ruby/ruby.h (SYM2ID): needs parens.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24888 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-13 03:07:51 +00:00
nobu 73b86a9be9 * include/ruby/ruby.h (NUM2INT, NUM2LL, INT2NUM, UINT2NUM),
(LONG2NUM, ULONG2NUM, NUM2CHR, rb_type_p, rb_special_const_p):
  GCC specific optimization.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24887 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-13 03:04:53 +00:00
nobu 9ad26a3d24 * include/ruby/win32.h (fstat): override if large file support is
enabled.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24844 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-11 04:57:40 +00:00
ko1 e519c9d960 * include/ruby/ruby.h (rb_data_type_t): Add comments.
And add a member variable "data", a multi-purpose storage
  area for rb_data_type.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24835 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-10 20:02:11 +00:00
takano32 bc664b878c Wed Sep 9 15:24:32 2009 TAKANO Mitsuhiro (takano32) <tak@no32.tk>
* include/ruby/st.h : revert previous commit.
	* ext/objspace/objspace.c : remove st_memsize declare.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24816 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-09 06:27:35 +00:00
takano32 103b471075 Wed Sep 9 14:07:19 2009 TAKANO Mitsuhiro (takano32) <tak@no32.tk>
* include/ruby/st.h : fix duplicate st_memsize declare.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24815 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-09 05:08:45 +00:00
nobu 78ab4258ff * st.c (st_free_table): constified.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24813 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-09 04:10:42 +00:00
nobu b46cd0e400 * include/ruby/ruby.h (rb_data_type_struct): constified dsize.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24801 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-09 02:11:35 +00:00
nobu e6dd856d73 * st.c (st_init_*table_with_size): use st_index_t.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24794 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-08 13:18:13 +00:00
nobu 31b7ae00c0 * include/ruby/st.h (st_hash_func): use st_index_t.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24792 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-08 13:10:04 +00:00
nobu 84255e0485 * vm_method.c (rb_remove_method_id): exported.
* numeric.c (num_sadded): fix for non-ascii method name.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24684 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-27 09:31:11 +00:00
nobu 9676023607 * random.c (random_rand): unified random_int and random_float.
[ruby-dev:39158].  and fixes [ruby-core:24655], [ruby-core:24677],
  [ruby-core:24679].


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24670 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-26 10:20:30 +00:00
usa 9096abd36a * include/ruby/missing.h (vsnprintf): rollback a part of r24179, because
it's meaningless.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24638 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-24 10:00:18 +00:00
naruse 7fa7345609 Rename FMODE_STRIP_BOM to FMODE_SETENC_BY_BOM.
* include/ruby/io.h, io.c (FMODE_SETENC_BY_BOM):
  renamed from FMODE_STRIP_BOM.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24606 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-21 06:17:06 +00:00
naruse 249697855e \d, \s and \w are now non Unicode class. [ruby-dev:39026]
* include/ruby/oniguruma.h
  (ONIGENC_CTYPE_SPECIAL_MASK): added.
  (ONIGENC_CTYPE_D): ditto.
  (ONIGENC_CTYPE_S): ditto.
  (ONIGENC_CTYPE_W): ditto.

* regparse.c: \d, \s and \w are now non Unicode class.
  [ruby-dev:39026]
  (fetch_token_in_cc): use ONIGENC_CTYPE_[DSW] for \d/\s/\w.
  (fetch_token): ditto.
  (add_ctype_to_cc): add routines for ONIGENC_CTYPE_[DSW].
  (parse_exp): ditto.

* test/ruby/test_regexp.rb (TestRegexp#test_char_class):
  add tests for above.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24544 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-15 16:01:33 +00:00
nobu 19b24f499b * include/ruby/ruby.h (rb_check_safe_str): deprecated.
* ext/openssl/ossl_x509store.c (ossl_x509store_add_{file,path}):
  replaced deprecated funtion.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24541 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-14 11:03:22 +00:00
nobu 31f4a82942 * 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]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24513 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-12 06:32:21 +00:00
nobu 60d1320326 * include/ruby/intern.h (rb_path2class): no deprecation.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24493 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-10 12:45:33 +00:00
nari de5f15bbe4 * gc.c: reject unused longlife gc.
* debug.c: ditto.

* include/ruby/intern.h: ditto.

* include/ruby/ruby.h: ditto.

* iseq.c: ditto.

* node.h: ditto.

* vm_insnhelper.c: ditto.

* vm_insnhelper.h: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24490 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-10 02:40:34 +00:00
nobu 3ece383660 * marshal.c (class2path, w_unique, w_extended, w_class, w_uclass):
deal with non-ascii class path.  [ruby-core:24790]

* marshal.c (r_unique, path2class, path2module, obj_alloc_by_path),
  (r_object0): ditto.

* variable.c (rb_path_to_class): new encoding-aware function to
  get a class from its name.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24488 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-09 21:55:55 +00:00
naruse 60ab77a16a Warn duplicated characters in character class of regexp. [ruby-core:24593]
* include/ruby/oniguruma.h (ONIG_SYN_WARN_CC_DUP): defined.
* regparse.h (ScanEnv): add warnings_flag.
* regparse.c (CC_DUP_WARN): defined for warn duplicated characters in
  character class of regexp. [ruby-core:24593]
  (add_code_range_to_buf): add CC_DUP_WARN.
  (next_state_val): add CC_DUP_WARN.
  (OnigSyntaxRuby): add ONIG_SYN_WARN_CC_DUP.
  (SET_ALL_MULTI_BYTE_RANGE): add env to arguments.
  (add_code_range): ditto.
  (add_code_range_to_buf): ditto.
  (not_code_range_buf): ditto.
  (or_code_range_buf): ditto.
  (and_code_range1): ditto.
  (and_code_range_buf): ditto.
  (and_cclass): ditto.
  (or_cclass): ditto.
  (add_ctype_to_cc_by_range): ditto.
  (add_ctype_to_cc): ditto.
  (parse_char_class): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24387 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-04 04:14:38 +00:00
nobu b8b083dbd5 * 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/trunk@24321 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-30 07:45:42 +00:00
nobu 2b2a9a23d0 * include/ruby/intern.h (rb_*str_new_cstr, rb_str_buf_new_cstr),
(rb_str_buf_cat2, rb_str_cat2, rb_exc_new2): suppress warnings.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24298 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-27 10:03:12 +00:00
azav 6c4e4f9a4b * include/ruby/defines.h [__SYMBIAN32__]: defined TRUE and FALSE to match changes in bignum.c and array.c.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24276 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-25 15:19:26 +00:00
usa 9dd0d27156 * win32/win32.[ch] (recvmsg, sendmsg): new functions to support recvmsg/
sendmsg like UNIX. these functions are experimental and not tested
	  well. bug reports are welcome.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24218 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-21 04:38:20 +00:00
nobu b3b7cd5f0e * include/ruby/defines.h (TRUE, FALSE): for internal use.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24193 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-18 07:03:15 +00:00
nobu f3d022543e * random.c (rb_random_{int32,real,bytes,int}): added functions for
extension libraries.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24189 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-18 00:16:25 +00:00
usa 436b2f887a * include/ruby/win32.h: include winsock headers in extern "C++" for
C++ extension libraries.

	* include/ruby/missing.h (vsnprintf): workaround for VC++.
	  [ruby-core:23096]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24179 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-17 21:33:05 +00:00
nobu 5e65d8f433 * bignum.c (rb_big_new, rb_bigzero_p), range.c (rb_range_values):
added for random.c.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24143 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-16 06:52:29 +00:00
ko1 c330876d7c * method.h, vm_core.h: add rb_method_entry_t. Remove nodes around
method management.  This change affect some VM control stack structure.
* vm.c, vm_insnhelper.c, vm_method.c, vm_eval.c: ditto.  and make some
  refactoring.
* insns.def, class.c, eval.c, proc.c, vm_dump.c : ditto.
* vm_core.h, compile.c (iseq_specialized_instruction): remove
  VM_CALL_SEND_BIT.  use another optimization tech for Kernel#send.
* node.h: remove unused node types.
* ext/objspace/objspace.c (count_nodes): ditto.
* gc.c: add mark/free functions for method entry.
* include/ruby/intern.h: remove decl of
  rb_define_notimplement_method_id().  nobody can use it
  because noex is not opend.
* iseq.c (iseq_mark): fix to check ic_method is available.
* iseq.c (rb_iseq_disasm): fix to use rb_method_get_iseq().



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24128 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-15 14:59:41 +00:00
nobu 5cc13fcb22 * include/ruby/ruby.h (rb_obj_{untrust,untrusted,trust}): added
prototypes.  [ruby-dev:38756]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24013 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-10 02:41:44 +00:00
naruse 634cfdc6e6 Set encoding and strip bom when modeenc string is "r:foo-bom" [ruby-dev:37236]
* include/ruby/io.h (FMODE_STRIP_BOM): new constant.

* io.c (io_encname_bom_p): judge whether the encoding name
  is *-bom or not.
  (parse_mode_enc): drop "-bom".
  (rb_io_modestr_fmode): set FMODE_STRIP_BOM if needed.
  (rb_io_extract_modeenc): ditto.
  (io_strip_bom): strip bom if exists.
  (io_set_encoding_by_bom): set encoding if there is bom.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24001 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-09 14:47:48 +00:00
ko1 9e60743008 * include/ruby/ruby.h:
rename
  "...TypeStruct" and "typed_struct" to
  "TypedData..." and "typeddata", respectively.
  rename
  rb_data_type_t#name to
  rb_data_type_t#wrap_struct_name.
* error.c, gc.c, iseq.c, vm.c: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23987 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-07 20:28:27 +00:00