summaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)Author
2007-12-24* include/ruby/intern.h, random.c, array.c:akr
change exported name. genrand_int32 -> rb_genrand_int32. genrand_real -> rb_genrand_real. [ruby-core:14335] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14588 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-24* load.c (rb_feature_p): returns loading path name too.nobu
* load.c (search_required): returns path too if feature is being loaded. [ruby-dev:32048] [TODO: refactoring] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14586 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-23comment updated.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14526 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-23* encoding.c (rb_enc_codepoint): implemented to raise invalidakr
encoding. * include/ruby/encoding.h (rb_enc_codepoint): macro is replaced as a declaration. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14524 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-22* include/ruby/encoding.h, encoding.c, re.c, io.c, parse.y, numeric.c,akr
ruby.c, transcode.c: rename rb_ascii_encoding. to rb_ascii8bit_encoding. rb_ascii_encoding is ambiguous with ASCII-8BIT and US-ASCII. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14504 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-22* io.c, io.h: temporary patch to partially implement transcode-on-read and ↵davidflanagan
transcode-on-write git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14497 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-22* common.mk (encs, ext/ripper/ripper.c): needs MFLAGS.nobu
* configure.in (STRINGIZE): stringizing macro. * include/ruby/defines.h (STRINGIZE): fallback. * tool/make-snapshot: new file. * version.c (ruby_description, ruby_copyright): string constants for -v option. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14469 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-21* encoding.c (rb_ascii_encoding): renamed from previousmatz
rb_default_encoding(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14443 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-21* include/ruby/ruby.h (rb_catch_obj, rb_throw_obj): prototyped.nobu
* include/ruby/intern.h (rb_fiber_alive_p): prototyped. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14431 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-21* encoding.c (rb_enc_replicate): now creates first class encoding.nobu
* encoding.c (rb_define_dummy_encoding): always based on the default encoding. * encoding.c (rb_enc_dummy_p): check if dummy. * encoding.c (enc_inspect): shows if dummy. * encoding.c (Init_Encoding): added dummy? method * include/ruby/encoding.h (ENCODING_INLINE_MAX): increased. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14429 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-21* enumerator.c (enumerator_iter_i): adjusted for rb_block_call_func.nobu
* include/ruby/ruby.h (rb_block_call_func): function to be called back as block. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14416 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-21* encoding.c (rb_enc_init): use enc_register_at() directly.nobu
* encoding.c (rb_utf8_encoding): returns utf-8 encoding. * include/ruby/encoding.h (rb_utf8_encoding): prototyped. * parse.y (UTF8_ENC): uses rb_utf8_encoding(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14410 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-21* encoding.c: include locale.hakr
(rb_locale_charmap): new method Encoding.locale_charmap for nl_langinfo(CODESET). * include/ruby/encoding.h (rb_locale_charmap): declared. * main.c (main): call setlocale with LC_CTYPE. * ruby.c (locale_encoding): use rb_locale_charmap. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14380 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-18* object.c (rb_obj_freeze): preserve frozen state of immediatematz
values in internal hash table, a la generic_ivar. * object.c (rb_obj_frozen_p): check immediate values too. * variable.c (generic_ivar_set): add frozen check fro immediate values. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14294 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-17* include/ruby/encoding.h (ENC_CODERANGE_VALID): rename fromakr
ENC_CODERANGE_8BIT. * string.c (rb_enc_str_coderange): follow the renaming. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14257 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-13* include/ruby/io.h (MakeOpenFile): fptr->enc should bematz
intialized to zero. [ruby-dev:32569] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14207 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-11* encoding.c (rb_enc_ascget): renamed from rb_enc_get_ascii.akr
* include/ruby/encoding.h: follow the renaming. * re.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14195 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-11* encoding.c (rb_enc_get_ascii): add an argument to provide the akr
length of the returned character. * include/ruby/encoding.h (rb_enc_get_ascii): add the argument. * re.c (rb_reg_expr_str): modify rb_enc_get_ascii call. (rb_reg_quote): ditto. (rb_reg_regsub): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14190 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-11* include/ruby/oniguruma.h (ONIGENC_CONSTRUCT_MBCLEN_NEEDMORE):akr
parenthesize an argument. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14189 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-10* transcode.c (str_transcode): allow non-registered encodings.nobu
[ruby-dev:32520] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14182 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-09* parse.y (expr): redefinable not (!) operator.matz
* parse.y (arg): ditto. * object.c (rb_obj_not): new method "!". * object.c (rb_obj_not_equal): new method "!=". * object.c (rb_obj_not_match): new method "!~". git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14162 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-09* include/ruby/ruby.h (FilePathStringValue): defined. similar toakr
FilePathValue but no taint check. * file.c (rb_get_path_no_checksafe): implementation of FilePathStringValue. (rb_file_s_basename): use FilePathStringValue. (rb_file_s_dirname): ditto. (rb_file_s_extname): ditto. (rb_file_s_split): ditto. (rb_file_join): ditto. * dir.c (file_s_fnmatch): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14155 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-08* encoding.c (rb_enc_mbclen): make it never fail.akr
(rb_enc_nth): don't check the return value of rb_enc_mbclen. (rb_enc_strlen): ditto. (rb_enc_precise_mbclen): return needmore(1) if e <= p. (rb_enc_get_ascii): new function for extracting ASCII character. * include/ruby/encoding.h (rb_enc_get_ascii): declared. * include/ruby/regex.h (ismbchar): removed. * re.c (rb_reg_expr_str): use rb_enc_get_ascii. (unescape_escaped_nonascii): use rb_enc_precise_mbclen to determine the termination of escaped non-ASCII character. (unescape_nonascii): use rb_enc_precise_mbclen. (rb_reg_quote): use rb_enc_get_ascii. (rb_reg_regsub): use rb_enc_get_ascii. * string.c (rb_str_reverse) don't check the return value of rb_enc_mbclen. (rb_str_split_m): don't call rb_enc_mbclen with e <= p. * parse.y (is_identchar): use ISASCII. (parser_ismbchar): removed. (parser_precise_mbclen): new macro. (parser_isascii): new macro. (parser_tokadd_mbchar): use parser_precise_mbclen to check invalid character precisely. (parser_tokadd_string): use parser_isascii. (parser_yylex): ditto. (is_special_global_name): don't call is_identchar with e <= p. (rb_enc_symname_p): ditto. [ruby-dev:32455] * ext/tk/sample/tkextlib/vu/canvSticker2.rb: remove coding cookie because the encoding is not UTF-8. [ruby-dev:32475] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14131 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-06* encoding.c (rb_enc_precise_mbclen): new function for mbclen withakr
validation. * include/ruby/encoding.h (rb_enc_precise_mbclen): declared. (MBCLEN_CHARFOUND): new macro. (MBCLEN_INVALID): new macro. (MBCLEN_NEEDMORE): new macro. * include/ruby/oniguruma.h (OnigEncodingTypeST): replace mbc_enc_len by precise_mbc_enc_len. (ONIGENC_PRECISE_MBC_ENC_LEN): new macro. (ONIGENC_CONSTRUCT_MBCLEN_CHARFOUND): new macro. (ONIGENC_CONSTRUCT_MBCLEN_INVALID): new macro. (ONIGENC_CONSTRUCT_MBCLEN_NEEDMORE): new macro. (ONIGENC_MBCLEN_CHARFOUND): new macro. (ONIGENC_MBCLEN_INVALID): new macro. (ONIGENC_MBCLEN_NEEDMORE): new macro. (ONIGENC_MBC_ENC_LEN): use ONIGENC_PRECISE_MBC_ENC_LEN. * enc/euc_jp.c: validation implemented. * enc/sjis.c: ditto. * enc/utf8.c: ditto. * string.c (rb_str_inspect): use rb_enc_precise_mbclen for invalid encoding. (rb_str_valid_encoding_p): new method String#valid_encoding?. * io.c (rb_io_getc): use rb_enc_precise_mbclen. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14119 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-01* include/ruby/intern.h (rb_uv_to_utf8): declared.akr
* re.c (rb_reg_preprocess): new function for dynamic regexp with \u{} such as Regexp.new("\\u{6666}"). (rb_reg_prepare_re): preprocess regexp for recompiling. (read_escaped_byte): new function. (unescape_escaped_nonascii): new function. (append_utf8): new function. (unescape_unicode_list): new function. (unescape_unicode_bmp): new function. (unescape_nonascii): new function. (rb_reg_initialize): preprocess regexp. * pack.c (rb_uv_to_utf8): renamed from uv_to_utf8. * parse.y (STR_NEW3): take func instead of has8 and hasmb. (parser_str_new): use default coderange mechanism except for regexp. (parser_tokadd_utf8): copy regexp source as-is. (parser_read_escape): UTF-8 stuff removed. (parser_tokadd_escape): has8bit and hasmb removed. (parser_tokadd_string): fix 8-bit single byte character with \u. (parser_parse_string): has8bit and hasmb removed. (parser_here_document): has8bit and hasmb removed. (parser_yylex): call parser_tokadd_utf8 instead of read_escape for UTF-8 character. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14072 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-01* encoding.c: rename primary_encoding -> default_external (encoding).matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14069 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-01* insnhelper.ci (vm_yield_with_cfunc): fix to passing argc on thirdko1
parameter of IFUNC. [ruby-dev:32329] * enumerator.c: fix to pass exact number of argument. * eval.c (rb_yield_values2): added. * include/ruby/ruby.h: ditto. * bootstraptest/test_knownbug.rb: move a fixed test. * bootstraptest/test_block.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14062 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-30* signal.c (ruby_signal): use SA_SIGINFO if available.matz
[ ruby-Patches-6418 ] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14057 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-30* signal.c (trap_signm): SIGVTALRM no longer used for greenmatz
thread. [ruby-talk:281318] * signal.c (ruby_sig_finalize): do not install SIG_DFL handler if previous handler is sighandler(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14056 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-27* include/ruby/encoding.h, encoding.c, re.c, string.c, parse.y: akr
rename ENC_CODERANGE_SINGLE to ENC_CODERANGE_7BIT. rename ENC_CODERANGE_MULTI to ENC_CODERANGE_8BIT. Because single byte 8bit character, such as Shift_JIS 1byte katakana, is represented by ENC_CODERANGE_MULTI even if it is not multi byte. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14027 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-25* include/ruby/encoding.h (rb_enc_str_asciionly_p): declared.akr
(rb_enc_str_asciicompat_p): defined. * re.c (rb_reg_initialize_str): use rb_enc_str_asciionly_p. (rb_reg_quote): return ascii-8bit string if the argument is ascii-only to generate encoding generic regexp if possible. (rb_reg_s_union): fix encoding handling. [ruby-dev:32094] * string.c (rb_enc_str_asciionly_p): defined. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14013 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-23* struct.c (rb_struct_alloc_noinit): new function.akr
(rb_struct_define_without_accessor): add allocator to the arguments. * range.c (range_alloc): re-introduced using rb_struct_alloc_noinit. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14003 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-23* struct.c (rb_struct_define_without_accessor): new function.akr
* range.c (range_alloc): removed. (Init_Range): use rb_struct_define_without_accessor. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14000 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-23* re.c (match_begin): should return offset by character.matz
[ruby-dev:32331] * re.c (match_end): ditto. * re.c (rb_reg_search): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13999 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-20* include/ruby/ruby.h: rename RFloat#double_value -> float_value.ko1
* numeric.c, parse.y: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13986 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-20* gc.h, vm_core.h: decl of rb_gc_save_machine_context()ko1
should be at vm_core.h. * include/ruby/ruby.h, intern.h: remove type rb_thread_t. * include/ruby/intern.h: change rb_unblock_function_t, rb_unblock_function_t. * file.c, process.c: apply above changes. * thread.c, thread_pthread.ci, thread_win32.ci: ditto. * io.c: support blocking open (2). [ruby-core:13614] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13984 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-20 * include/ruby/win32.h win32/win32.c (rb_w32_pipe_exec): use dual fdusa
instead of socketpair when mode is RDWR. * io.c (pipe_open): pass &write_fd to rb_w32_pipe_exec(). * io.c (popen_redirect): define only when HAVE_FORK. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13978 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-20* include/ruby/io.h (rb_io_t): add tied_io_for_writing member.akr
* io.c: use tied_io_for_writing for duplex popen. * gc.c: mark tied_io_for_writing. * common.mk: gc.o depends io.h. [ruby-dev:32205] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13977 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-19* configure.in: check struct timespec, clock_gettime, utimensat,akr
struct stat.st_atim, struct stat.st_atimespec, struct stat.st_atimensec, struct stat.st_mtim, struct stat.st_mtimespec, struct stat.st_mtimensec, struct stat.st_ctim, struct stat.st_ctimespec, struct stat.st_ctimensec. * include/ruby/missing.h: provide struct timespec if not available. * time.c: support nanosecond-resolution using struct timespec. * include/ruby/intern.h: provide rb_time_nano_new. * file.c (utime_internal): use utimensat if available. (rb_file_s_utime): refactored. (rb_f_test): use stat_atime, stat_mtime, stat_ctime. (rb_stat_cmp): check tv_nsec. (stat_atimespec): new function. (stat_atime): ditto. (stat_mtimespec): ditto. (stat_mtime): ditto. (stat_ctimespec): ditto. (stat_ctime): ditto. (rb_stat_atime): use stat_atime. (rb_file_s_atime): ditto. (rb_file_atime): ditto. (rb_stat_mtime): use stat_mtime. (rb_file_s_mtime): ditto. (rb_file_mtime): ditto. (rb_file_ctime): use stat_ctime. (rb_file_s_ctime): ditto. (rb_stat_ctime): ditto. * variable.c (rb_copy_generic_ivar): clear clone's instance variables if obj has no instance variable. * marshal.c (w_object): dump instance variables of generated string for TYPE_USERDEF, even if original object has instance variables. * lib/time.rb (Time#xmlschema): use nsec instead of usec. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13968 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-16* include/ruby/ruby.h: added some declarations for event hooks.shugo
* lib/profile.rb: set VM::InstructionSequence.compile_option. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13946 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-13* include/ruby/ruby.h: introduce 2 macros:ko1
RFLOAT_VALUE(v), DOUBLE2NUM(dbl). Rename RFloat#value -> RFloat#double_value. Do not touch RFloat#double_value directly. * bignum.c, insns.def, marshal.c, math.c, numeric.c, object.c, pack.c, parse.y, process.c, random.c, sprintf.c, string.c, time.c: apply above changes. * ext/dl/mkcallback.rb, ext/json/ext/generator/generator.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13913 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-10-22* encoding.c (rb_enc_compatible): check if two objects have compatiblenobu
encodings. * encoding.c (enc_compatible_p): added Encoding.compatible?. * include/ruby/encoding.h (rb_enc_compatible): prototype. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13750 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-10-21* encoding.c (rb_enc_default, rb_enc_primary): return pointers tonobu
rb_encoding of default and primary respectively. [ruby-core:12795] * encoding.c (set_primary_encoding): removed primary_encoding setter. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13746 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-10-18* range.c (range_first): takes first n element if argument ismatz
given. [ruby-core:12697] * range.c (range_last): returns last n elements if argument is given. * array.c (rb_ary_subseq, rb_ary_last): export. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13736 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-10-16* encoding.c (rb_primary_encoding): added Encoding.primary_encoding.nobu
* parse.y (rb_parser_encoding): added. * ruby.c (proc_options): added -E and --encoding options. * ruby.c (process_options): set primary encoding from command line option if set, or source encoding. * include/ruby/encoding.h (rb_enc_from_encoding, rb_get_primary_encoding, rb_set_primary_encoding): prototypes. * include/ruby/node.h (rb_parser_encoding): prototype. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13729 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-10-13* encoding.c (rb_cEncoding): new Encoding class.nobu
* encoding.c (rb_to_encoding, rb_to_encoding_index): helper functions. * encoding.c (rb_obj_encoding): return Encoding object now. * gc.c (garbage_collect): mark Encoding objects. * string.c (rb_str_force_encoding): accept Encoding object as well as encoding name. * include/ruby/encoding.h (rb_to_encoding_index, rb_to_encoding): prototypes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13692 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-10-11* include/ruby/node.h (NOEX_LOCAL): remove unused local visibility.matz
* class.c (ins_methods_push): ditto. * class.c (rb_class_local_methods): method removed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13680 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-10-10* include/ruby/oniguruma.h (OnigEncodingTypeST): add OnigEncodingmatz
parameter to every function members. * include/ruby/oniguruma.h (OnigEncodingTypeST): add auxiliary data member to provide user defined data for an encoding. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13674 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-10-07* include/ruby/node.h: make node flags as VALUE type.akr
enum ruby_node_flags removed. * ruby.c: define RUBY_NODE_* as const for gdb. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13653 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-10-07refined again.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13651 b2dd03c8-39d4-4d8f-98ff-823fe69b080e