aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* * test/ruby/test_transcode.rb: added tests from Martin Duerst <duerstnobu2007-12-112-29/+63
| | | | | | | AT it.aoyama.ac.jp>. [ruby-dev:32532] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14192 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * transcode.c (transcode_loop): get rid of SEGV at sequence can not benobu2007-12-112-15/+24
| | | | | | | | | converted. * transcode.c (rb_str_transcode_bang): copy encoding. [ruby-dev:32532] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14191 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * encoding.c (rb_enc_get_ascii): add an argument to provide the akr2007-12-114-69/+90
| | | | | | | | | | | | | 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
* * include/ruby/oniguruma.h (ONIGENC_CONSTRUCT_MBCLEN_NEEDMORE):akr2007-12-112-1/+6
| | | | | | | parenthesize an argument. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14189 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_method_missing): RDoc update patch from Hugh Sassematz2007-12-102-0/+8
| | | | | | <hgs AT dmu.ac.uk>. [ruby-core:12932] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14188 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/http.rb (Net::HTTP::get): now supports gzipmatz2007-12-102-3/+57
| | | | | | | content-encoding. a patch from Hugh Sasse <hgs AT dmu.ac.uk>. [ruby-core:13451] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14187 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (shadowing_lvar_gen): no duplicate error for "_".matz2007-12-103-17/+25
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14186 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c (rb_ary_slice_bang): If an invalid range is given, doknu2007-12-103-2/+33
| | | | | | | not raise an exception but return nil just like slice() does. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14183 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * transcode.c (str_transcode): allow non-registered encodings.nobu2007-12-103-7/+34
| | | | | | | [ruby-dev:32520] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14182 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c (rb_ary_slice_bang): should return nil if position outmatz2007-12-102-0/+7
| | | | | | | of range. a patch from Akinori MUSHA <knu AT iDaemons.org>. [ruby-dev:32518] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14181 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * re.c (rb_reg_match): should calculate offset by convertedmatz2007-12-102-4/+11
| | | | | | operand. [ruby-cvs:21416] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14180 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* "// =~ :a" abort.akr2007-12-101-0/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14179 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/uri/common.rb (URI::REGEXP::PATTERN): typo in REG_NAMEmatz2007-12-102-1/+7
| | | | | | | regular expression. a patch from Ueda Satoshi <s-ueda AT livedoor.jp>. [ruby-dev:32514] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14177 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * string.c (rb_str_tmp_new): creates hidden temporary buffer.nobu2007-12-105-292/+229
| | | | | | | | | | | | | | * transcode.c (transcoding): added a pointer to function to flush. * transcode.c (transcode_loop): do not use string internal. [ruby-dev:32512] * transcode.c (str_transcode): allow Encoding objects. * transcode_data.h (BYTE_LOOKUP): use actual struct name. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14176 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * transcode*.[ch], test/ruby/test_transcode.rb: set properties.nobu2007-12-102-46/+46
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14175 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * string.c (rb_str_insert): should not add length in bytes to index innobu2007-12-102-3/+8
| | | | | | | chars. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14174 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_f_public_send): rename invoke_method to public_send.matz2007-12-104-20/+17
| | | | | | it now invokes public method only no matter how it's called. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14173 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * transcode.c: new file to provide encoding conversion features.matz2007-12-108-3/+3797
| | | | | | code contributed by Martin Duerst. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14172 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * re.c (rb_reg_search): return byte offset. [ruby-dev:32452]nobu2007-12-103-29/+54
| | | | | | | | | | | | * re.c (rb_reg_match, rb_reg_match2, rb_reg_match_m): convert byte offset to char index. * string.c (rb_str_index): return byte offset. [ruby-dev:32472] * string.c (rb_str_split_m): calculate in byte offset. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14171 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* add ML ref.akr2007-12-101-0/+8
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14170 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * benchmark/bm_vm1_neq.rb, bm_vm1_not.rb: prop set.ko12007-12-102-15/+15
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14169 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * benchmark/bm_vm1_neq.rb, bm_vm1_not.rb: added.ko12007-12-103-0/+19
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14168 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * object.c (rb_obj_not_match): wrong test.matz2007-12-092-2/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14167 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* update tests for String#inspect replacing \xHH instead of \OOO.akr2007-12-091-27/+27
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14166 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (parser_yylex): wrong token was generated. [ruby-dev:32498]matz2007-12-093-5/+9
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14165 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * re.c (rb_reg_expr_str): use \xHH instead of \OOO.akr2007-12-099-11/+28
| | | | | | | | | | | | | | | | | | * regerror.c (to_ascii): ditto. (onig_snprintf_with_pattern): ditto. (onig_snprintf_with_pattern): ditto. * string.c (rb_str_inspect): ditto. (rb_str_dump): ditto. * parse.y (parser_yylex): ditto. * ruby.c (proc_options): ditto. * file.c (rb_f_test): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14164 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * re.c (rb_reg_names): new method Regexp#names.akr2007-12-094-6/+171
| | | | | | | | | | | (rb_reg_named_captures): new method Regexp#named_captures (match_regexp): new method MatchData#regexp. (match_names): new method MatchData#names. * lib/pp.rb (MatchData#pretty_print): show names of named captures. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14163 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (expr): redefinable not (!) operator.matz2007-12-097-95/+87
| | | | | | | | | | | | * 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
* * re.c (rb_reg_s_last_match): accept named capture's name.akr2007-12-093-44/+93
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14161 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Regexp#fixed_encoding? documented.akr2007-12-091-0/+25
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14160 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* document named capture of MatchData#{offset,begin,end,inspect}.akr2007-12-092-4/+20
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14159 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * re.c (match_backref_number): new function for converting a backrefakr2007-12-093-6/+110
| | | | | | | | | | | | name/number to an integer. (match_offset): use match_backref_number. (match_begin): ditto. (match_end): ditto. (name_to_backref_number): raise IndexError instead of RuntimeError. (match_inspect): show capture index. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14158 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval_intern.h (CHECK_STACK_OVERFLOW): reserve frame size.ko12007-12-092-2/+7
| | | | | | | | [ruby-dev:32485] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14157 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm.c (rb_thread_mark): use rb_gc_mark_maybe() forko12007-12-093-7/+19
| | | | | | | | | VM stack specified by mark_stack_len. * insnhelper.ci: clear vm stack extended by opt value. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14156 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/ruby.h (FilePathStringValue): defined. similar toakr2007-12-095-8/+68
| | | | | | | | | | | | | | | | | 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
* * re.c (append_utf8): check unicode range.akr2007-12-093-4/+27
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14154 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/cgi.rb (read_multipart): exclude blanks from header values.nobu2007-12-092-5/+10
| | | | | | | [ruby-list:44327] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14153 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * file.c (rb_get_path): use the original object if to_path method isnobu2007-12-093-1/+13
| | | | | | | | | | not defined. [ruby-dev:32473] * io.c (rb_f_open): call to_open on non-string objects, instead of to_str. [ruby-dev:32473] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14152 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * string.c (tr_find): returns true if no characters to be removed isnobu2007-12-094-8/+13
| | | | | | | specified. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14151 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (parser_magic_comment): delimits with a semicolon.nobu2007-12-092-1/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14150 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2007-12-09nobu2007-12-091-3/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14149 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * string.c (tr_trans): get rid of segfaults when has mulitbytes butnobu2007-12-094-10/+13
| | | | | | | source sets have no mulitbytes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14148 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix added test.akr2007-12-091-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14147 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* more tests.akr2007-12-091-0/+49
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14146 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* more tests.akr2007-12-091-0/+58
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14145 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * encoding.c (rb_enc_precise_mbclen): return needmore if underlyingakr2007-12-082-2/+8
| | | | | | | implementation returns a length longer than e-p. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14144 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix previous commit.akr2007-12-081-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14143 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* add a test for casecmp with sjis string.akr2007-12-081-0/+7
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14142 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * encoding.c (rb_enc_mbclen): return 1 if underlying implementationakr2007-12-082-1/+7
| | | | | | | returns a length longer than e-p. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* add a test for concatinating euc-jp and ascii-8bit string.akr2007-12-081-0/+9
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14140 b2dd03c8-39d4-4d8f-98ff-823fe69b080e