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

11177 Коммитов

Автор SHA1 Сообщение Дата
matz 76b247202a * io.c (io_encoding_set): IO.pipe("euc-jp", nil) should work as
IO.pipe("euc-jp", nil).  [ruby-dev:33000]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14974 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-10 01:54:43 +00:00
matz 81064a7688 * io.c (rb_io_binmode): should not alter encoding. [ruby-dev:32918]
* io.c (io_read_encoding): need not to return ASCII-8BIT for
  binary IO.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14972 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-09 17:44:13 +00:00
matz b3f93b1f43 * lib/e2mmap.rb (Exception2MessageMapper::Raise): define fail.
[ruby-dev:32854]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14971 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-09 14:23:34 +00:00
kazu cbf7c9adde * lib/mathn.rb (Prime#each): returns an enumerator if no block
given. [ruby-dev:32815]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14970 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-09 13:10:31 +00:00
naruse ad4fb57a3a * encoding.c (rb_enc_replicate): replica of dummy is a dummy.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14969 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-09 13:06:00 +00:00
gotoyuzo b04f5e661f * lib/webrick/httprequest.rb: supprt X-Forwarded-* header fields.
WEBrick::HTTPRequest#{host,port,request_uri} is derived having
  regards to X-Forwarded-Proto and X-Forwarded-Host.

* lib/webrick/httprequest.rb
  (WEBrick::HTTPRequest#server_name?): new method.
  (WEBrick::HTTPRequest#remote_ip?): new method.
  (WEBrick::HTTPRequest#ssl?): new method.
* string.c (rb_enc_cr_str_buf_cat): fix self appending.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14968 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-09 11:37:03 +00:00
eban 53ac21c325 * golf_prelude.rb (Array#to_s): alias to join.
* golf_prelude.rb (FalseClass#to_s): return "".


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14967 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-09 09:28:19 +00:00
akr 8786b8a282 * string.c (rb_enc_cr_str_buf_cat): fix self appending.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14966 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-09 08:00:26 +00:00
nobu d036633dcb * ruby.c (process_options): give priority command line encoding option
to RUBYOPT, and enable -E option in RUBYOPT.

* ruby.c (load_file): deal with encoding option in shebang line if
  nothing in command line and RUBYOPT.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14965 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-09 06:54:26 +00:00
usa ff1cd79d08 * parse.y (yycompile0): remove setting parser->enc because it is set
in parser_prepare() by previous change of parser_prepare().



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14964 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-09 05:57:29 +00:00
nobu 9874fdbc86 * string.c (rb_enc_cr_str_buf_cat, rb_str_buf_append): deal with self
appending.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14963 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-09 05:52:20 +00:00
usa 3f2d1892df * parse.y (parser_prepare): set parser->enc from lex_input for ripper.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14962 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-09 05:46:35 +00:00
gotoyuzo a5505ab833 * lib/webrick/server.rb (WEBrick::HTTPServer#start):
:DoNotReverseLookup option had not been performed.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14961 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-09 04:46:55 +00:00
matz 251dec5cf1 * string.c (rb_enc_cr_str_buf_cat): do not recalculate coderange
value if it's given from outside.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14960 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-09 04:07:11 +00:00
jeg2 8ed70a5186 * enum.c: Updating the documentation of Enumrable#zip to reflect
the recent changes Matz made to the method.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14959 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-08 23:42:38 +00:00
naruse fdeb4b1384 * enc/Makefile.in (BUILTIN_ENCS): UTF-{16,32}{BE,LE} are not builtin.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14958 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-08 16:58:31 +00:00
naruse 5cd70fa5e9 * encoding.c (rb_enc_init): UTF-{16,32}{BE,LE} are not builtin.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14957 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-08 14:56:50 +00:00
naruse ed540e8bdf * encoding.c, Makefile.in, include/ruby/oniguruma.h,
enc/Makefile.in: fix rules for UTF-{16,32}{BE,LE}.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14956 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-08 13:35:24 +00:00
nobu 1889c00e07 * win{32,ce}/Makefile.sub: merged.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14955 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-08 11:02:10 +00:00
drbrain edeeefb7a5 Speed up Marshal load, fix bug with nested classes' methods
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14954 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-08 10:49:19 +00:00
drbrain 3e39ade457 Clean up namespacing of RI's classes
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14953 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-08 10:18:41 +00:00
matz 929faf7906 * enum.c (enum_zip): honor length of the receiver, not the
shortest length.  [ruby-core:14738]

* enum.c (enum_zip): returns array not enumerator for no block
  form.  [ruby-core:14738]

* enumerator.c (next_ii): do not ignore multiple values yielded.

* array.c (rb_ary_zip): faster version without creating generators.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14952 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-08 09:50:01 +00:00
nobu 1309c10332 * set properties.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14951 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-08 09:31:47 +00:00
drbrain e539dc6080 Replace ri with Ryan Davis' cached ri
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14950 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-08 09:07:31 +00:00
nobu cc22700b90 * enc/utf_{16,32}{be,le}.c: renamed to match with encoding names.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14949 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-08 07:27:53 +00:00
nobu aab064f0dc * enc/utf_{16,32}{be,le}.c: renamed to match with encoding names.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14948 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-08 07:27:43 +00:00
usa ecf8b1c807 * enc/utf{16,32}_{be,le}.c: use &OnigEncodingName(*) instead of
ONIG_ENCODING_*.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14947 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-08 06:48:49 +00:00
nobu dca4de6838 * regenc.c (onigenc_strlen_null, onigenc_str_bytelen_null): suppressed
warnings.

* regenc.h, enc/unicode.c (onigenc_unicode_ctype_code_range): added
  encoding argument.

* enc/utf{16,32}_{be,le}.c: added init functions.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14946 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-08 06:40:33 +00:00
nobu 4cc42da33f * enc/utf{16,32}_{be,le}.c: imported from Oniguruma 5.9.1.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14945 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-08 06:27:22 +00:00
akr 389abf1b3b * string.c (str_gsub): avoid appending empty pre-match substr.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14944 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-08 06:04:26 +00:00
nobu 893ee30978 * compile.c (iseq_build_from_ary), iseq.c (iseq_load): fix for format change.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14943 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-08 04:05:59 +00:00
usa 6a1a57d13b * 2008-01-08
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14942 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-08 00:06:38 +00:00
akr fc5a26c2d4 * string.c (rb_str_buf_append): fix append itself.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14941 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-07 22:57:00 +00:00
nobu f07c8e6413 set properties.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14940 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-07 22:19:26 +00:00
drbrain 3938f9db46 Add additional information to RDoc template values
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14939 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-07 21:28:43 +00:00
akr 7425f59f10 * string.c (STR_ENC_GET): defined. same as rb_enc_get without
enc_capable.
  (coderange_scan): ASCII-8BIT test refined.
  (rb_enc_cr_str_buf_cat): new internal function to accumulate
  strings with encoding.
  (rb_enc_str_buf_cat): use rb_enc_cr_str_buf_cat.
  (rb_str_buf_append): ditto
  (str_gsub): use rb_str_buf_append.
  (rb_str_hash): use ENCODING_GET.
  (rb_str_comparable): ditto.
  (rb_str_cmp): compare encoding index, not rb_encoding address.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14938 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-07 16:28:43 +00:00
akr 05e52bf46b add tests.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14937 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-07 15:32:07 +00:00
gotoyuzo cc3350f118 * lib/webrick/httpservlet/cgihandler.rb: external encoding of
tempfiles is set to "ASCII-8BIT".


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14936 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-07 11:40:41 +00:00
drbrain 466d40ed15 Use ERB instead of custom template language for RDoc.
Remove old_html template.

Convert all templates to ERB.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14935 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-07 10:40:50 +00:00
matz f2707db2dc * string.c (Init_String): sym_match arity spec was wrong. a patch
from Hiroyuki Iwatsuki <don at na.rim.or.jp> in [ruby-dev:32957].

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14934 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-07 10:12:45 +00:00
matz 4d6c034752 add test_knownbug [ruby-core:14813]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14933 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-07 10:01:34 +00:00
akr 3e2fe4a1eb * string.c (str_gsub): move rb_enc_get(str) to out of loop.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14932 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-07 09:11:28 +00:00
akr 4e4d4331ca * include/ruby/oniguruma.h (OnigEncodingType): new member
ruby_encoding_index to avoid linear search in rb_enc_to_index.

* include/ruby/encoding.h (rb_enc_to_index): macro defined to use
  ruby_encoding_index.

* encoding.c (rb_enc_to_index): removed.
  (enc_register_at): initialize ruby_encoding_index member.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14931 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-07 07:48:24 +00:00
drbrain ead85d123f Namespace TokenStream under RDoc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14930 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-07 07:11:15 +00:00
matz 48db39e355 add test_knowbug [ruby-core:14813]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14929 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-07 07:07:44 +00:00
drbrain 9ad5f854e7 Namespace RDoc::DOT. Clean up formatting of RDoc::Diagrams.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14928 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-07 07:06:59 +00:00
drbrain 4b93d732e4 Convert RDoc to OptionParser, clean up -h output, namespace Options under RDoc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14927 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-07 06:56:46 +00:00
usa b9127221e5 * common.mk, Makefile.in, */Makefile.sub (distclean-local): move
removing rule of ext/ripper/y.output from common.mk to Makefiles
	  that depend on platforms.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14926 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-07 06:53:39 +00:00
nobu afb1b2b58f * lib/rdoc/generators.rb: set properties.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14925 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-07 06:46:12 +00:00
akr 238c59842c * re.c (rb_reg_preprocess): fix fixed_enc condition.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14924 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-07 04:55:26 +00:00