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

10785 Коммитов

Автор SHA1 Сообщение Дата
nobu 0a20a506e1 * ruby.c (load_file): preserves $.. [ruby-dev:36937]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19965 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-27 06:58:28 +00:00
nobu 782f3bd3f9 * io.c (argf_init): initial value of $. should be 0.
see [ruby-dev:36937].


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19964 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-27 06:55:06 +00:00
yugui 1a863754fa * test/minitest/test_mini_test.rb
(test_assert_raises_triggered_different): the test failed when a
  file path in the backtrace contontains something except [\w\/\.],
  e.g. hyphen, Japanese characters or backslash.

* test/minitest/test_mini_test.rb
  (test_assert_raises_triggered_subclass): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19963 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-27 06:43:13 +00:00
yugui a1cef99541 * test/minitest/test_mini_test.rb: fixed that r19958 made
test-all fail when the ruby was built at $(srcdir).

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19962 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-27 06:34:23 +00:00
yugui 0a88cb504b * test/ruby/envutil.rb: reverted the changeset 19948 because it
concealed unexpected behaviours of ruby.

* test/ruby/test_io.rb: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19961 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-27 03:13:54 +00:00
yugui a61e734d0f * ChangeLog: added missing timestamps
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19960 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-27 03:13:47 +00:00
kazu 4e0b83e95b * ext/nkf/nkf.c (rb_nkf_convert): should specify type of variable.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19959 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-27 03:04:22 +00:00
yugui afea4a4995 * test/minitest/test_mini_test.rb (test_filter_backtrace):
fixed failure on Ruby built at out of $(srcdir).

* test/minitest/test_mini_test.rb (test_Filter_backtrace_unit_starts):
  ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19958 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-27 02:39:17 +00:00
kazu 83acdeedd8 fix typo
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19957 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-27 02:15:08 +00:00
usa db8e3024e7 * io.c (read_all): the 3rd argument maybe Qnil.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19956 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-27 01:03:22 +00:00
mame 52061f4ecd * test/nkf/test_nkf.rb: add a test for [ruby-dev:36909].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19955 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-26 16:31:15 +00:00
naruse f850cf2866 * ext/nkf/nkf.c (rb_nkf_convert): avoid GC.
reported in [ruby-dev:36909] and patched [ruby-dev:36941] by mame.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19953 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-26 16:08:03 +00:00
nobu 824e1e4265 * ChangeLog: fixed indentation.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19951 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-26 13:49:10 +00:00
mame 2b3f026b8a * test/json/test_json.rb: remove dependency on permutation gem.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19950 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-26 12:30:07 +00:00
nobu 945faf92e6 * gem_prelude.rb: disables debug and verbose flags to suppress failure
messages.  interpolation does not occur inside single quotes.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19949 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-26 10:18:39 +00:00
nobu b98a6b7ac0 * test/ruby/envutil.rb (assert_in_out_err): disables builtin rubygems
to get rid of the interference.

* test/ruby/test_io.rb (ruby): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19948 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-26 09:42:21 +00:00
nobu bcf61f58d5 * ext/io/wait/{extconf.rb,wait.c}: needs sys/ioctl.h for fcntl on
cygwin.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19947 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-26 09:11:40 +00:00
nobu 201eb37d92 * ext/etc/etc.c (sGroup): getgrent may not be available.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19946 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-26 09:07:37 +00:00
nobu 860fad971d * thread.c (blocking_region_{begin,end}): declared as inline.
* util.c (freedtoa): used only when MULTIPLE_THREADS is not defined.

* win32/win32.c (rb_w32_pipe): serial is DWORD.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19945 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-26 09:01:23 +00:00
nobu 0db5641dae * io.c (read_all): use the given buffer to read when needs readconv.
based on the patch by wanabe <s.wanabe AT gmail.com> at
  [ruby-dev:36931].


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19943 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-26 04:30:45 +00:00
drbrain b61d8b6045 Update to RubyGems 1.3.1 r1909.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19941 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-25 22:58:43 +00:00
ryan 17358af75b Imported minitest 1.3.0 r4429. Fixes issues reported by akira and nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19940 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-25 22:38:09 +00:00
yugui fe7ce06150 * configure.in ($MANTYPE): followed ruby.1, which had moved.
* instruby.rb (:man): ditto.

* mdoc2man.rb: fixed for the case Xr with 2 arguments.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19939 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-25 17:20:05 +00:00
yugui 4dd24d6ba6 * man/irb.1: new manual page.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19938 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-25 16:44:13 +00:00
yugui 92d172e9c3 * man/ruby.1: moved into man/. added some descriptions.
* man/goruby.1: new file.

* instruby.rb (:man): followed ruby.1.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19937 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-25 15:15:24 +00:00
nari ee1e8e1a9b * gc.c (gc_profile_result): bug fix. The millisecond is 1/1000.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19934 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-25 11:10:39 +00:00
yugui 5106742893 * ruby.c (usage): updated the description of -E option.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19932 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-25 02:18:53 +00:00
jeg2 dfda5877ca * lib/csv.rb: Fixed a bug in read_to_char() that would slurp
whole files if the encoding was invalid.  It will now read
  up to 10 bytes ahead to find a valid character boundary or
  give up.  [ruby-core:19465]
* test/csv/test_features.rb, test/csv/test_table.rb, test/csv/test_row.rb:
  Loosened some tests to check for a compatible? Encoding instea
  of an exact Encoding.  [ruby-core:19470]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19931 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-25 00:54:38 +00:00
drbrain 7222e82a8b Import RDoc 2.2.2 r192
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19930 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-24 23:05:28 +00:00
nobu da6300e8f8 * enc/us_ascii.c (us_ascii_mbc_enc_len): made static. a patch by
Tadashi Saito <shiba AT mail2.accsnet.ne.jp> at [ruby-dev:36916]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19929 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-24 19:00:35 +00:00
nobu 5c3fe0e339 * signal.c (signal_buff): made static. a patch by Tadashi Saito
<shiba AT mail2.accsnet.ne.jp> at [ruby-dev:36915]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19928 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-24 18:58:52 +00:00
nobu d8267b72b5 * util.c (freedtoa): made static to get rid of name clash. a patch by
Tadashi Saito <shiba AT mail2.accsnet.ne.jp> at [ruby-dev:36913]

* util.c (ruby_dtoa): added prefix, ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19927 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-24 18:56:31 +00:00
nobu a26b7a0c82 * parse.y (lambda): need to adjust lpar_beg for both of the parser and
ripper.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19926 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-24 18:43:27 +00:00
matz 0ad553ce58 * ext/mathn/rational/rational.c: undef duplicated macro definition
first to shut up the warning.

* ext/mathn/rational/rational.c (rb_rational_new_mathn): specify
  omitted return value.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19925 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-24 16:30:09 +00:00
nobu 4f577310ce * array.c (rb_ary_sample): fixed sizes and randomness.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19924 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-24 15:14:44 +00:00
yugui 5660e09f08 * configure.in (sitedir): considers --program-prefix and
--program-suffix.
  (vendordir): ditto.
  (rubyhdrdir): ditto.

* mkconfig.rb (CONFIG["rubylibdir"]): ditto.

* win32/Makefile.sub: ditto.

* instruby.rb (:rdoc): ditto.

* lib/rdoc/ri/paths.rb (RDoc::RI::Paths): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19923 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-24 14:05:49 +00:00
mame f7d4df50c0 * test/ruby/test_array.rb (test_sample): add tests for size of
returned array and randomness.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19922 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-24 14:01:21 +00:00
nobu 3093546f1f * id.h, template/id.h.tmpl (enum ruby_method_ids): reordered.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19921 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-24 12:50:35 +00:00
keiju f953305ff5 * ext/mathn/rational.c: change several global functions.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19920 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-24 12:20:58 +00:00
xibbar b1c14f8fbb * lib/cgi/html.rb: allow symbolized key.
* test/cgi/test_cgi_tag_helper.rb: add a test.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19919 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-24 12:10:27 +00:00
nobu 1e2b744ed2 * common.mk (exts): renamed to get rid of the existent directory.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19918 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-24 11:55:07 +00:00
keiju 7e8ab850b0 * ext/mathn/rational.c: change several global functions to static
function.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19916 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-24 11:47:59 +00:00
matz 3896936492 * string.c (rb_str_dump): should have removed commented out
unnecessary code.  [ruby-cvs:27131]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19914 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-24 10:58:33 +00:00
shyouhei 78d2b00893 * string.c (rb_str_dump): do not use C++ comment.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19913 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-24 10:30:09 +00:00
shyouhei 5ff7af42b0 * id.h (enum ruby_method_ids): ISO C forbids comma at end of
enumerator list



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19912 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-24 10:24:01 +00:00
keiju 4f817e2a9d * lib/mathn.rb: moved into ext/mathn/rational/rational.c and
ext/mathn/complex/complex.c.
 * ext/mathn: new mathn ext-libralies.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19911 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-24 09:39:53 +00:00
matz 9afe0278b3 * test/ruby/test_array.rb (TestArray#test_join): should restore
global variable after the test.  [ruby-dev:36896]

* test/ruby/test_hash.rb (TestHash#test_to_s): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19910 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-24 09:25:05 +00:00
matz 5f7be192df ChangeLog: adjust indent.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19909 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-24 09:09:34 +00:00
matz aed0c718db * parse.y (lambda): need to adjust lpar_beg for ripper as well.
[ruby-dev:36702]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19908 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-24 09:08:43 +00:00
xibbar 5443cf1517 fix typo
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19907 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-24 07:34:54 +00:00
xibbar 86560b12ee * lib/cgi/core.rb (read_multipart): change field value as String
from StringIO of Tempfile when multipart parse without file field.
  add files method that can uploaded files. [ruby-dev:36547] 

* test/cgi/test_cgi_multipart.rb: fix the test for core.rb.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19906 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-24 07:25:53 +00:00
nobu 9e1bddfda2 * common.mk (ext): split out the target for extension library.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19905 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-24 05:22:51 +00:00
nobu 8d47e63135 * common.mk (encs): depends on enc and trans.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19904 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-24 05:13:18 +00:00
kazu 2169d5d3c6 * test/ruby/test_signal.rb (TestSignal#test_exit_action): Thread
may terminate before sysread. [ruby-dev:36835]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19902 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-24 01:28:32 +00:00
yugui 6e1ed14606 * distruby.rb: removed. "make dist" uses tool/make-snapshot for the 1.9
series. distruby.rb has been no longer used.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19901 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-23 13:08:48 +00:00
matz 06151d4a99 * class.c (rb_class_instance_methods): rdoc fixed. [ruby-core:19458]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19900 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-23 08:30:52 +00:00
matz 04e30e3103 * lib/irb/init.rb (IRB.load_modules): catch LoadError explicitly.
a patch from Daniel Berger <Daniel.Berger at qwest.com> in
  [ruby-core:19451].  fix [ruby-core:19450]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19899 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-23 07:21:05 +00:00
nobu 409293eb09 * ext/socket/socket.c (sock_s_getservbyport): check if the port range.
[ruby-core:19460]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19898 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-23 07:16:20 +00:00
matz 5a8db29b59 * string.c (rb_str_dump): use \u{ff} escape for UTF-8 encoding
string.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19897 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-23 06:53:55 +00:00
nobu 472156c236 * ext/socket/socket.c (sock_s_getservbyname): unuse unnecessary
object.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19896 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-23 05:08:10 +00:00
nobu a5ea0e8c32 * ext/socket/socket.c (sock_s_getservbyport): the port should be
converted before the proto so that the #to_int of the former cannot
  alter the latter.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19895 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-23 02:18:00 +00:00
usa 538d87cf11 * ext/socket/socket.c (sock_s_getservbyport): cast to get rid of
warning.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19894 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-23 00:27:52 +00:00
matz c1bb485ca0 * ext/socket/socket.c (sock_s_getservbyport): port should be
network byte order.  a patch from Dave Thomas in [ruby-core:19454].

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19893 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-22 23:12:02 +00:00
matz 38c7a687e1 * string.c (rb_str_conv_enc_opts): new function to convert with
specifying ecflags and ecopts.

* ext/zlib/zlib.c (gzfile_newstr): specify ecflags and ecopts for
  conversion using above function.

* ext/zlib/zlib.c (gzfile_newstr): use own rb_econv_t for dummy
  encoding to handling stateful encoding (e.g. iso-2022-jp).
  [ruby-dev:36857]

* ext/zlib/zlib.c (gzfile_getc): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19892 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-22 16:53:50 +00:00
nobu b6807f8356 * lib/mkmf.rb (create_tmpsrc): get rid of side effects.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19891 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-22 16:24:58 +00:00
ko1 8a0d53ac2b * cont.c: separate data structure between rb_fiber_t and
rb_context_t (rb_fiber_t includes rb_context_t).
  rb_fiber_t has double linked list of fibers in same threads.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19890 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-22 15:12:07 +00:00
matz a9a23756b5 * io.c (pipe_open): remove unnecessary flush before fork.
a patch from Kazuhiro NISHIYAMA <zn at mbf.nifty.com>
  in [ruby-dev:36840].

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19888 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-22 08:27:48 +00:00
nobu 5c0515f2e2 * vm_insnhelper.c (vm_yield_setup_args): should not drop arguments
corresponding to default paramters.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19887 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-22 07:28:00 +00:00
matz e8a71e64a1 * parse.y (f_larglist): should not allow semicolon separated local
variable declarations if formal argument list is not surrounded
  by parentheses, mostly because semicolon outside of parentheses
  appears to terminate the expression.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19886 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-22 06:03:12 +00:00
matz 4a3f2a7bc5 * string.c (rb_external_str_new_with_enc): no implicit strlen call.
[ruby-dev:36854]

* string.c (rb_external_str_new_cstr): new function to create
  string from external NUL terminated C string.

* string.c (rb_locale_str_new_cstr): ditto.

* ext/readline/readline.c: now use rb_locale_str_new_cstr().

* test/sdbm/test_sdbm.rb (TestSDBM#test_delete_with_block):
  deleted key to the block may be a copy of specified key.

* test/dbm/test_dbm.rb (TestDBM#test_delete_with_block): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19885 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-22 05:55:22 +00:00
matz 1d38a821ea * re.c (unescape_escaped_nonascii): back out the last change on
the function.  [ruby-dev:36818]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19884 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-22 04:27:32 +00:00
matz 81525af4c9 * ext/zlib/zlib.c (rb_gzreader_ungetc): should be able to unget
Fixnum.

* ext/stringio/stringio.c (strio_ungetc): should convert unget
  string.

* ext/stringio/stringio.c (strio_ungetbyte): new method.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19883 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-21 22:10:49 +00:00
ko1 34d1e9bb25 * include/ruby/vm.h: write a comment.
* common.mk: remove vm.h from any rules.
  vm.h is not needed on this version.
* vm_core.h: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19882 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-21 20:59:23 +00:00
ko1 bf52a3c0c4 update ChangeLog for last check in.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19881 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-21 20:46:08 +00:00
matz fa127bbb18 * string.c (rb_external_str_new_with_enc): wrong condition to
calculate strlen().

* ext/readline/readline.c: add encoding support.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19879 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-21 15:52:07 +00:00
seki 87fa1cdfdb Fixed test failures [ruby-dev:36837].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19875 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-21 15:32:35 +00:00
matz 16549e33da * ext/stringio/stringio.c (strio_write): should convert writing
string to the encoding of the buffer.

* hash.c (rb_any_hash): typo fixed.

* ext/zlib/zlib.c (rb_gzwriter_write): oops, IO string conversion
  need to be done by to_s.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19874 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-21 14:14:13 +00:00
matz c5377c2bcc * io.c (open_key_args): should adjust argc, argv in struct
foreach_arg.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19873 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-21 13:57:16 +00:00
matz 42a6550027 * ext/zlib/zlib.c (rb_gzwriter_write): conversion should be done
using to_str, not to_s.

* ext/zlib/zlib.c (rb_gzwriter_write): need proper conversion
  according to gz encoding.

* ext/zlib/zlib.c (rb_gzreader_ungetc): convert string encoding
  before unget.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19872 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-21 12:56:48 +00:00
nobu ac466de7ff * lib/test/unit.rb (assert_nothing_raised): raise with backtrace.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19871 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-21 12:33:44 +00:00
akr 04f674188e * lib/test/unit.rb (assert_nothing_raised): set backtrace.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19870 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-21 11:13:28 +00:00
matz b6ef272d02 * ext/zlib/zlib.c: remove obsolete prototype macros.
* ext/zlib/zlib.c (struct gzfile): add encoding field to gzfile
  structure.

* ext/zlib/zlib.c (rb_gzreader_getc): now works on characters.

* ext/zlib/zlib.c (rb_gzreader_getbyte): new method to retrieve
  single byte.

* ext/zlib/zlib.c (rb_gzreader_readbyte): ditto.

* ext/zlib/zlib.c (rb_gzreader_each_byte): renamed from each_char

* ext/zlib/zlib.c (rb_gzreader_ungetc): allow unget strings.

* ext/zlib/zlib.c (rb_gzreader_ungetbyte): renamed from ungetc.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19869 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-21 09:18:34 +00:00
shugo d423b884b8 * io.c, include/ruby/intern.h (rb_io_ascii8bit_binmode): externed.
* ext/socket/socket.c (init_sock): use rb_io_ascii8bit_binmode()
  instead of rb_io_binmode().


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19868 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-21 04:31:15 +00:00
yugui 89dfcd82f0 * mdoc2man.rb: moved into tools/.
* instruby.rb: followed the change of mdoc2man.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19867 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-21 04:19:56 +00:00
nobu 5225f2c143 * ext/iconv/iconv.c (strip_glibc_option, map_charset): check if
encoding is a string.  based on the patch by Hiroshi Moriyama at
  [ruby-dev:36811].

* test/iconv/test_basic.rb (test_invalid_arguments): added tests.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19866 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-21 02:34:07 +00:00
nobu 4442095d4c * io.c (rb_file_open_internal): should initialize fmode before using.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19865 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-21 01:40:41 +00:00
nobu 05a157ed8a * regparse.c (parse_char_class): CCV_SB is only for single
byte.  [ruby-dev:36786]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19864 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-20 23:56:40 +00:00
nobu 5e7203ea22 * regparse.c (parse_char_class): CCV_SB is only for single
byte.  [ruby-dev:36786]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19863 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-20 22:45:17 +00:00
matz e50a5bcef0 * io.c (rb_io_extract_modeenc): plain rb/wb should set ASCII-8BIT
to the external_encoding.

* io.c (rb_file_open_internal): ditto.

* io.c (NEED_WRITECONV): no conversion when the external_encoding
  is ASCII-8BIT.

* io.c (do_writeconv): skip ASCII-8BIT.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19862 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-20 16:57:19 +00:00
akr 7d48eab260 * io.c (rb_io_ascii8bit_binmode): renamed from rb_io_binmode.
(rb_io_binmode): don't change encoding conversion.
  (rb_io_binmode_m): call rb_io_ascii8bit_binmode.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19860 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-20 15:53:14 +00:00
xibbar 225d2af65a * lib/cgi/core.rb (read_multipart): file's encoding is ascii-8bit
from file field of multipart form.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19858 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-20 12:29:29 +00:00
matz 71b832dd8e * ext/zlib/zlib.c (Init_zlib): add getbyte as an alias to getc.
[ruby-dev:36801]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19857 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-20 11:21:57 +00:00
matz b348ed3344 * error.c (exc_equal): should not compare recursively.
[ruby-dev:36796]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19856 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-20 11:18:50 +00:00
matz 6259c87d02 * include/ruby/ruby.h (ExportStringValue): new macro to convert
string in internal encoding to external to export.

* string.c (rb_str_export): new function to do conversion to
  external encoding.

* ext/sdbm/init.c: encoding conversion support.

* ext/dbm/dbm.c: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19855 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-20 08:05:44 +00:00
matz 52b3e3b97f * string.c (rb_locale_str_new): new function to convert string
from locale to internal encoding.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19854 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-20 07:15:19 +00:00
akr d4e0abcec9 * test/runner.rb: search srcdir/test/arg at first to find test/ruby
directory when "ruby" is specified.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19853 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-20 00:48:24 +00:00
nagai 27fdb77821 * ext/tk/lib/tk.rb: support Encoding.default_internal.
* ext/tk/tcltklib.c: ditto.
* ext/tk/extconf.rb: improve the strategy for searching Tcl/Tk headers.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19852 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-19 23:22:10 +00:00
akr 4ee47dcc07 fix typos.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19851 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-19 18:27:31 +00:00
akr 8fe3d0285f * lib/test/unit.rb (Test::Unit.setup_argv): call given block for
filtering files.

* test/runner.rb: search srcdir/test/arg, srcdir/arg.

* bin/testrb: show usage if no files given.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19849 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-19 15:59:35 +00:00
nobu 295c75cb7c * tool/generic_erb.rb: sends the result to stdout if no output option.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19848 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-19 12:19:19 +00:00
nobu de85d6e92e * common.mk (srcs): removed ID_H_TARGET.
* tool/generic_erb.rb: always overwrites if no if-change option.

* template/id.h.tmpl: shows which token differs.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19847 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-19 12:12:53 +00:00
duerst b014f1bc02 * enc/trans/single_byte.trans: adding WINDOWS-wwww encodings
(wwww = 874/1250/1251/1253/1254/1255/1256/1257)
  (contributed by Yoshihiro Kambayashi)

* enc/trans/windows-wwww-tbl.rb: 8 new files
  (contributed by Yoshihiro Kambayashi)

* test/ruby/test_transcode.rb: added test_windows_wwww
  (contributed by Yoshihiro Kambayashi)


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19846 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-19 09:15:37 +00:00
tadf 81b1fef56c * lib/cmath.rb (log2,cbrt,frexp,ldexp,hypot,erf,erfc,gamma,lgamma):
should be also privided as module function.  [ruby-dev:36787]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19845 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-18 22:43:06 +00:00
yugui c2091e37ec * keywords, lex.c.src, opt_insn_unif.def, opt_operand.def: moved rarely changed
input files for code generators into defs/ directory.

* Makefile.in (lex.c): followed keywords and lex.c.src.

* common.mk (parser.o): followed keywords.
  (INSNS): followed opt_*.def

* tools/instruction.rb: followed opt_*.def.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19844 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-18 22:30:13 +00:00
jeg2 b7be78d774 * test/csv/*: Renamed tc_* files to test_* to fit in within Ruby's
testing process.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19843 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-18 15:30:24 +00:00
akr 5cf4f78aea * lib/test/unit.rb (assert_nothing_thrown): don't intern.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19840 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-18 15:15:57 +00:00
duerst 45e6848741 ChangeLog: moved entries back and corrected date
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19838 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-18 13:02:23 +00:00
matz d3546e79ae * parse.y (opt_block_arg): allow trailing comma after usual
arguments.  not after block argument.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19837 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-18 11:49:39 +00:00
matz 957f69d2de ChangeLog: move entries to proper place.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19836 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-18 10:46:58 +00:00
matz 8705e3623c * numeric.c (num_sadded): remove newly defined singleton method
that should not exist after exception handling.  [ruby-dev:36569]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19835 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-18 10:39:41 +00:00
matz 3f0ec8887f * string.c (rb_external_str_new): a new function to convert from
external encoding to internal encoding.  if something went
  wrong, it returns a string with the external encoding.

* string.c (rb_external_str_new_with_enc): same as above besides
  you can specify the source encoding.

* ruby.c (ruby_set_argv): use rb_external_str_new()

* ruby.c (set_arg0, ruby_script): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19834 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-18 10:36:20 +00:00
matz 88aa863274 * lib/tempfile.rb (Tempfile#initialize): now Tempfile.new takes
keyword arguments to open().  [ruby-dev:36756]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19833 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-18 10:32:26 +00:00
matz fcce99c52d * re.c (rb_reg_initialize_m): specify ARG_ENCODING_NONE instead of
ARG_ENCODING_FIXED for Regexp.new("", nil, "n").  [ruby-dev:36761]

* test/ruby/test_regexp.rb (TestRegexp#test_initialize): test
  updated.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19832 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-18 10:29:06 +00:00
duerst 7adbfbb793 * tool/transcode-tblgen.rb: added set_valid_byte_pattern
to reduce coupling between table generation script and
  specific encodings.

* enc/trans/single_byte.trans: using set_valid_byte_pattern


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19831 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-18 08:10:57 +00:00
duerst da1ffe490d * transcode.c: in transcode_search_path, elimintated a warning
on cygwin about pathlen potentially not being initialized


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19830 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-18 07:41:09 +00:00
akr 6fa352271f * lib/test/unit.rb (assert_nothing_thrown): implemented.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19828 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-18 04:41:17 +00:00
eban c2fab59341 * common.mk: use added options for generic_erb.rb.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19827 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-17 16:38:54 +00:00
wanabe b29f3640e9 * array.c: don't recycle shared-array while sort!.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19825 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-17 15:51:35 +00:00
wanabe 331cd4eed6 * array.c: recycle shared-array when it isn't referenced.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19824 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-17 13:09:33 +00:00
nobu 26b3c7a0f3 * id.h: reverted.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19823 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-17 11:56:11 +00:00
nobu b025ce4678 * common.mk (ID_H_TARGET): phony target to update id.h.
* tool/ifchange, win32/ifchange.bat: --timestamp option added.

* tool/generic_erb.rb: --timestamp, --output and --if-change options
  added.

* template/id.h.tmpl: moved from id.h.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19822 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-17 10:46:23 +00:00
yugui 6e738bf2b1 * array.c (ary_resize_capa): renamed RESIZE_CAPA.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19821 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-17 10:42:11 +00:00
matz 6b02097f79 * test/bigdecimal/test_bigdecimal.rb (TestBigDecimal#test_sqrt_bigdecimal):
test updated.  a patch from TAKANO Mitsuhiro <takano32 at jus.or.jp> in
  [ruby-dev:36736].

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19820 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-17 09:17:11 +00:00
nobu 93e4ba927c * configure.in (uncommon.mk): ignores failures at loading.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19819 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-17 09:15:00 +00:00
matz 5ef37965fc * transcode.c (str_transcode0): String#encode without argument now
behave as if :undef => :replace, :invalid => :replace specified.

* transcode.c (rb_econv_prepare_opts): should preserve options in
  any case.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19818 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-17 09:13:04 +00:00
nobu 7de38fadc0 * test/rubygems/gemutilities.rb (RubyGemTestCase#build_rake_in):
get rid of interference with other tests.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19817 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-17 09:07:27 +00:00
shugo 5545c5aafa * ext/socket/socket.c (init_sock): sockets should be binmode.
* test/socket/test_tcp.rb (test_encoding): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19816 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-17 02:50:43 +00:00
usa 68222eb417 * tool/insns2vm.rb: remove -Kn option in shebang line because it's
inconsistent with -Ks commandline option in common.mk.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19815 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-17 01:30:13 +00:00
matz 98e6f9a79c * re.c (rb_reg_initialize_m): changed the message to clarify the
third option argument is now ignored.  [ruby-dev:36753]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19813 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-16 22:39:04 +00:00
matz 1e8bbf3154 * .gdbinit (rp): REGEXP handling fixed.
* string.c (rb_str_rindex_m): need not to call rb_enc_check on
  regexp.

* re.c (unescape_escaped_nonascii): try ASCII-8BIT encoding for
  broken strings.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19812 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-16 22:21:42 +00:00
matz 4709e330cf * ruby.c (proc_options): no warning when default_external already
set by -E.

* test/ruby/test_rubyoptions.rb (TestRubyOptions#test_rubyopt):
  put -K after -E to set script encoding.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19811 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-16 22:21:09 +00:00
akr c2b9d34f62 * transcode.c (transcode_restartable0): in_pos and out_pos never be
NULL, now.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19810 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-16 16:26:53 +00:00
mame 978f8ca10a * lib/test/unit.rb: sort the order of executing tests.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19809 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-16 15:40:49 +00:00
akr 0cda4bb3bf * io.c (rb_io_binmode): reset encoding conversion.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19807 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-16 15:25:25 +00:00
mame ca9589aeb0 * io.c (rb_getc, rb_io_fread, rb_io_fwrite, rb_read_pending):
remove deprecated functions which do not work.  [ruby-dev:36697]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19805 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-16 15:18:17 +00:00
akr 0f4ea5f3e3 * common.mk (TESTS): removed to re-enable test for minitest.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19804 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-16 14:49:32 +00:00
mame 01cdeb8da7 * compile.c (iseq_set_sequence): fix memory leak.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19803 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-16 14:38:08 +00:00
akr ba1e27f3ca * lib/test/unit.rb (assert_equal): avoid incompatible character
encodings error.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19802 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-16 14:28:06 +00:00
akr 338253cbe5 * lib/test/unit.rb (assert_equal): failure message changed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19801 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-16 14:24:08 +00:00
akr 0ebf9b1763 * lib/test/unit: removed test/unit.
* lib/test/unit.rb: new compatibility layer using minitest.

* bin/testrb: use above.

* test/runner.rb: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19800 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-16 13:55:09 +00:00
nobu 7485e91f76 * common.mk, enc/depend (enc, trans): targets for sources.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19799 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-16 05:34:25 +00:00
matz f71b2c94dc * test/ruby/test_transcode.rb (TestTranscode#test_errors):
String#encode now works without any argument. [ruby-dev:36740]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19796 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-15 21:26:59 +00:00
matz 7a0acc7eee * lib/delegate.rb (DelegateClass): restored 1.8 behavior for
DelegateClass as well.  [ruby-dev:36739]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19795 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-15 14:12:15 +00:00
usa 55ae1d90a3 * ChangeLog: add ML ref.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19794 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-15 13:22:47 +00:00
usa 6c4895c78a * array.c (RESIZE_CAPA): check whether len is longer than capacity.
* array.c (rb_ary_compact_bang): resize ary before changing capacity.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19793 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-15 13:21:37 +00:00
usa a917be2c28 * version.h (RUBY_DESCRIPTION): remove unnecessary space.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19791 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-15 07:58:42 +00:00
matz 40adf66644 * ruby.c (process_options): -U should be allowed in RUBYOPT
environment variable.  [ruby-dev:36720]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19790 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-15 07:48:34 +00:00
matz f9c35bce1b * lib/delegate.rb (Delegator): simplified and restored 1.8
behavior.  [ruby-dev:35986]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19786 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-14 14:21:25 +00:00
matz 80cdf946f7 * transcode.c (str_transcode0): should not raise error when
default_internal is not set.  [ruby-core:19309]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-14 14:05:11 +00:00
nobu 45f505c40f * common.mk (TESTS): skips minitest by default, since it interferes
with test/unit.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19783 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-14 12:50:43 +00:00
suke f457364cae * ext/win32ole/win32ole.c (load_conv_function51932): check
having IMultiLanguage2 or IMultiLanguage. [ruby-dev:36716]

* ext/win32ole/extconf.rb: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19782 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-14 12:44:37 +00:00
nobu 1288965f4e * io.c (Init_IO): $FILENAME and $* must be read-only. [ruby-dev:36698]
* variable.c (*_getter, *_setter, *_marker): made public.

* include/ruby/ruby.h (rb_gvar_*_{getter,setter,marker}): declared.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19781 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-14 11:45:32 +00:00
akr b968fa97f6 * enc/trans/single_byte.trans (transcode_tblgen_singlebyte): renamed
from transcode_tblgen_windows.
  (transcode_tblgen_iso8859): use transcode_tblgen_singlebyte.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19780 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-14 11:33:17 +00:00
nobu 40c08c9ee6 * ruby.c (proc_options): -U can be followed by other options.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19779 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-14 05:11:20 +00:00
duerst 48a303c027 * enc/trans/single_byte.trans: added windows-1252
* enc/trans/windows-1252-tbl.rb: new file
  (contributed by Yoshihiro Kambayashi)

* tool/transcode-tblgen.rb: listed windows-1252 as '1byte'

* test/ruby/test_transcode.rb: added test_windows_1252
  (contributed by Yoshihiro Kambayashi)


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19778 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-14 04:37:10 +00:00
kazu 9639bf54ec * test/ruby/test_variable.rb (TestVariable#test_variable): add
a test of [ruby-dev:36698].


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19777 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-14 03:23:57 +00:00
kazu 0e0d05d5f4 * lib/net/pop.rb: check for invalid APOP timestamp. (CVE-2007-1558)
[ruby-dev:36631]

* test/net/pop/test_pop.rb: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19776 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-14 02:22:46 +00:00
matz 339ceda4e8 * ruby.c (set_internal_encoding_once): check double contradicted
specification of the encoding from command line.

* ruby.c (set_external_encoding_once): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19773 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-14 00:41:09 +00:00
matz c196780964 * parse.y (parser_yylex): allow reserved word to be keyword argument.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19771 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-14 00:36:52 +00:00
naruse 20ed75a639 * parse.y (token_info_pop): show source filename. [ruby-dev:36710]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19770 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-13 10:13:40 +00:00
suke 80a5a3f9dc * ext/win32ole/win32ole.c (load_conv_function51932): support
CP51932 on cygwin and mingw32. thanks to arton.

* test/win32ole/test_win32ole.rb (test_cp51932): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19767 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-13 00:03:11 +00:00
matz 9ed35ae793 * ruby.c (proc_options): add -U command line option to specify
utf-8 as default_internal.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19766 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-12 23:03:17 +00:00
matz 284f4c8431 * transcode.c (str_transcode0): String#encode() with no encoding
specified transcode the string into Encoding.default_internal.
  inspired by [ruby-core:19298].

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19764 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-12 22:52:01 +00:00
suke e64453aa69 * ext/win32ole/win32ole.c (set_ole_codepage, ole_cp2encoding,
ole_wc2mb, ole_vstr2wc, ole_mb2wc): support CP51932 (only mswin32).

* test/win32ole/test_win32ole.rb: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19763 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-12 09:06:45 +00:00
ko1 7215c9af95 * vm.c, vm_insnhelper.h (ruby_vm_redefined_flag): apply optimization
patch proposed by Paul Brannan.  [ruby-core:19171]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19762 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-12 03:28:49 +00:00
nobu 893af1e3b6 * strftime.c (rb_strftime): suppressed warnings on cygwin.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19760 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-12 00:46:59 +00:00
nobu d9fdf58aaa * parse.y (parser_prepare): use utf-8 encoding directly.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19758 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-11 10:49:56 +00:00
nobu 3c276224fc * lib/mkmf.rb (CLEANINGS): uses escaped form tabs to preventing the
confusion.  [ruby-talk:317345]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19756 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-11 01:20:20 +00:00
nobu e9fff84b95 * lib/rake.rb (Rake::Application#standard_exception_handling): removed
unnecessary SystemExit, and exits with false instead of system
  dependent value.  [ruby-talk:317330]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19755 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-10 23:51:16 +00:00
ko1 3f710785f0 * parse.y: optimize 'for' statement when one variable given.
* benchmark/bm_loop_for.rb: added.
* benchmark/bm_loop_times.rb: modified.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19753 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-10 19:19:36 +00:00
jeg2 7d3d353558 * lib/csv/csv.rb: Added support for Encoding::default_internal.
* lib/csv/csv.rb:  Switched to new Hash syntax.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19751 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-10 15:09:34 +00:00
akr aa2797ee41 fix typos.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19750 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-10 13:21:36 +00:00
nobu 4b51662800 * parse.y (comment_at_top): needed for ripper too.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19749 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-10 13:16:58 +00:00
nobu fb93e65c76 * include/ruby.h: updated macros for headers. [ruby-core:19275]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19748 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-10 13:07:07 +00:00
nobu a77d088cf6 * parse.y (magic_comment_encoding): warns when ignored.
* parse.y (parser_magic_comment): replaces '-' with '_'.

* parse.y (parser_yylex): allows magic comments indented and the
  second line or later.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19747 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-10 10:21:53 +00:00
naruse 5b35f2c137 * ext/json/ext/parser/parser.c (JSON_parse_string):
associate encoding.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19745 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-10 08:28:19 +00:00
ryan c71e65e92f Updated changelog for test/unit / minitest switch
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19744 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-10 06:18:44 +00:00
nobu 94355e2984 * sprintf.c (rb_str_format): check if codepoint for %c is valid.
[ruby-dev:36691]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19737 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-09 18:41:35 +00:00
nobu 017ff9bfa2 * encoding.c (enc_names): minor improvement.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19736 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-09 16:55:51 +00:00
nobu 05124e6a55 * lib/optparse.rb (ParseError.filter_backtrace): removes internal
backtrace.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19735 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-09 15:21:42 +00:00
mame fc9c37dfc9 * transcode.c (rb_econv_add_coverter): remove unnecessary NULL check.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19733 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-09 15:12:20 +00:00
nobu fd8ca75663 * misc/ruby-style.el (ruby-style-c-mode): buffer may not have file
name.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19731 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-09 14:53:26 +00:00
mame 2f67ef8332 * process.c (run_exec_dup2): fix resource leak.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19730 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-09 14:31:32 +00:00
mame ab2868bfba * process.c (rb_run_exec_options): fix resource leak.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19729 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-09 14:24:15 +00:00
mame 270f2f15be * test/ruby/test_module.rb (test_remove_class_variable): add a test
for Class#remove_class_variable.

* test/ruby/test_object.rb (test_remove_instance_variable): add a test
  for Object#remove_instance_variable.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19728 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-09 13:16:07 +00:00
mame ae4bc66b64 * variable.c (rb_mod_remove_cvar): fix r19711.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19727 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-09 13:07:28 +00:00
mame 525b4535ca * ext/syck/syck.c (syck_lookup_sym): remove reading uninitialized
variable.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19726 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-09 12:18:42 +00:00
naruse 3b1e5ba31c * ext/json/ext/generator/extconf.rb: fix target.
* ext/json/ext/parser/extconf.rb: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19725 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-09 07:34:56 +00:00
yugui c86ce094e2 * include/ruby/ruby.h: embeds the elements of an array into its
struct RArray for # of elements <= 3.

	* array.c: ditto.

	* gc.c (gc_mark_children): following the change of struct RArray.

	* ext/tk/tcltklib.c (ip_ruby_cmp): ditto.

	* parse.y (coverage): ditto.

	* proc.c (curry): ditto.

	* .gdbinit: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19723 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-09 05:47:04 +00:00
naruse 517a1c3406 * encoding.c (Init_Encoding): new instance method Encoding#names,
returns its name and alias names.

* encoding.c (enc_names): defined for Encoding#names.

* encoding.c (enc_names_i): defined for enc_names.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19722 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-09 02:52:39 +00:00
matz 22c8e88b41 * thread.c (rb_thread_wait_fd_rw): should not block by select if
there's only one thread living.  fixed [ruby-dev:36646].

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19719 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-08 23:49:22 +00:00
suke b7212ba643 * ext/win32ole/win32ole.c (ole_init_cp): initialize WIN32OLE.codepage
according to Encoding.default_internal and
  Encoding.default_external.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19717 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-08 12:05:18 +00:00
naruse cd9f5a1eee * ext/json/lib/json/pure/generator.rb (utf8_to_json):
process each unpacked Unicode character.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19714 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-08 08:03:08 +00:00
naruse 87259f9a5f * ext/json/lib/json/pure/parser.rb
(JSON::Pure::Parser#parse_string): force_encoding("UTF-8").

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19713 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-08 06:01:48 +00:00
naruse ccf184d9e4 * lib/test/unit/assertions.rb: assert_nothing_thrown,
assert_raise, assert_not_equal, assert_no_match, assert_not_nil,
  assert_not_same are coming back as alias.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19712 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-08 03:00:11 +00:00
nobu d011b2e3ef * variable.c (autoload_delete, autoload_file): should not delete
autoload table, since it may be shared with duplicated modules.
  [ruby-core:19181]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19710 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-08 02:18:15 +00:00
matz baeeebf474 * encoding.c (rb_default_internal_encoding): merged a patch from
Michael Selig <michael.selig at fs.com.au> in [ruby-core:18985].

* io.c (rb_io_ext_int_to_encs): ditto.

* ruby.c (proc_options): support default internal encoding in -E
  option.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19709 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-07 17:39:44 +00:00
tadf 2bf7d240b8 * lib/date.rb (today,now): should produce own instances.
[ruby-talk:317020]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19705 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-07 15:08:42 +00:00
naruse 84f677d2f3 * ext/json/lib/json/pure/generator.rb (utf8_to_json):
force_encoding before gsub.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19704 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-07 07:50:43 +00:00
naruse 6d58b1e54f * ext/json/lib/json/pure/generator.rb (utf8_to_json):
downcase the result of Unicode escape.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19703 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-07 07:37:23 +00:00
xibbar ddf88ea80b * lib/cgi/core.rb (CGI::QueryExtension::initialize_query): fix the
condition.

* test/cgi/test_cgi_core.rb: bug fix encoding.
  thaks to TAKANO Mitsuhiro <takano32 at jus.or.jp> .

* test/cgi/test_cgi_multipart.rb: temporary comment in.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19702 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-06 07:53:58 +00:00
nobu 73a2f67164 * gc.c (gc_mark_children): ignores T_ZOMBIE.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19700 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-06 06:22:11 +00:00
matz 5e9cfca2d4 * test/ruby/test_module.rb (TestModule#test_mod_constants): should
not depend on global Module constants.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19699 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-06 03:49:17 +00:00
matz f4d37a3ff4 * test/ruby/test_module.rb (TestModule#_wrap_assertion): add
definition.  is this really needed?

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19698 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-06 03:46:11 +00:00
matz b8623eab43 * lib/test/unit/assertions.rb (Test::Assertions#assert_nothing_raised):
should take optional message argument.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19697 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-06 03:42:25 +00:00
matz f2f2cd5bc6 * string.c (rb_str_comparable): string comparison should be
transitive.  [ruby-dev:36484]

* test/ruby/test_m17n_comb.rb (TestM17NComb#test_str_eq): test
  updated.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19696 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-06 03:22:56 +00:00
matz 2de01f01a7 * test/bigdecimal/test_bigdecimal.rb (test_sqrt_bigdecimal): test
updated.  a patch from TAKANO Mitsuhiro <takano32 at jus.or.jp>
  in [ruby-dev:36669].

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19694 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-06 00:02:44 +00:00
nobu 8e39257025 * lib/mkmf.rb ($config_h): now always defines for old libraries.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19692 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-05 14:34:37 +00:00
nobu 4c88510849 * vm_method.c (rb_mod_modfunc): method undefined in included module
may not have nd_body.  [ruby-core:18738]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19691 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-05 14:07:06 +00:00
tadf c3986f2805 * lib/rational.rb: resolved conflicts of aliases.
* lib/mathn.rb: avoided some warnings.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19689 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-05 12:30:54 +00:00
akr a64f397403 * lib/open-uri.rb: remove debug code introduced by previous change.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19688 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-05 09:53:17 +00:00
naruse f09149cab5 * lib/open-uri.rb (OpenURI.open_uri): set encoding to strio.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19687 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-05 08:51:22 +00:00
naruse fd898245cb * ext/stringio/stringio.c (strio_set_encoding): defined for
StringIO#set_encoding.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19686 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-05 08:47:01 +00:00
naruse 5e1311da38 * eval.c: come back definition of environ.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19684 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-05 02:26:45 +00:00
naruse 146ea3c398 * ext/nkf/nkf-utf8/utf8tbl.c: update table.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19683 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-05 01:10:41 +00:00
yugui e8ee99ff1a * dln.c: Ruby no longer supports VMS.
* error.c: ditto.

* eval.c: ditto.

* eval_intern.h: ditto.

* include/ruby/defines.h: ditto.

* include/ruby/ruby.h: ditto.

* io.c: ditto.

* process.c: ditto.

* ruby.c: ditto.

* vms/config.h: removed.

* vms/vms.h: ditto.

* vms/vmsruby_private.c: ditto.

* vms/vmsruby_private.h: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19682 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-04 13:57:06 +00:00
yugui a8c3540b32 * dln.c: Ruby no longer supports Windows CE.
* eval.c: ditto.

* include/ruby/defines.h: ditto.

* include/ruby/win32.h: ditto.

* ruby.c: ditto.

* strftime.c: ditto.

* win32/Makefile.sub: ditto.

* win32/win32.c: ditto.

* ext/tk/extconf.rb: ditto.

* lib/fileutils.rb: ditto.

* test/fileutils/test_fileutils.rb: ditto.

* wince/*: removed.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19681 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-04 13:48:20 +00:00
yugui 642e081879 * dln.c: Ruby no longer supports MacOS 9 or before.
* eval.c: ditto.

* eval_intern.h: ditto.

* ext/extmk.rb: ditto.

* ext/tk/sample/tkextlib/treectrl/demo.rb: ditto.

* ext/tk/stubs.c: ditto.

* file.c: ditto.

* hash.c: ditto.

* include/ruby/defines.h: ditto.

* ruby.c: ditto.

* signal.c: ditto.

* vm_core.h: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19680 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-04 13:42:00 +00:00
yugui ae7ea3332b * dln.c: Ruby no longer supports MS-DOS.
* ext/sdbm/_sdbm.c: ditto.

* ext/sdbm/sdbm.h: ditto.

* gc.c: ditto.

* hash.c: ditto.

* include/ruby/defines.h: ditto.

* include/ruby/util.h: ditto.

* io.c: ditto.

* process.c: ditto.

* ruby.c: ditto.

* strftime.c: ditto.

* util.c: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19679 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-04 13:33:22 +00:00
yugui 8dd118c0db * djgpp/GNUmakefile.in: removed. Ruby no longer supports djgpp.
* djgpp/README.djgpp: ditto.

* djgpp/config.hin: ditto.

* djgpp/config.sed: ditto.

* djgpp/configure.bat: ditto.

* djgpp/mkver.sed: ditto.

* ext/Setup.dj: ditto.

* dln.c: removed djgpp supports.

* file.c: ditto.

* gc.c: ditto.

* io.c: ditto.

* process.c: ditto.

* ruby.c: ditto.

* signal.c: ditto.

* util.c: ditto.

* vm_core.h: ditto.

* lib/fileutils.rb: ditto.

* lib/mkmf.rb: ditto.

* ext/socket/socket.c: ditto.

* test/fileutils/test_fileutils.rb: ditto.

* test/ruby/test_env.rb: ditto.

* test/ruby/test_path.rb: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19678 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-04 13:25:12 +00:00
yugui bbbd9c0b7b * x68/_dtos18.c: removed. Ruby no longer supports human68k.
* x68/_round.c: ditto.

* x68/fconvert.c: ditto.

* x68/select.c: ditto.

* ext/Setup.x68: ditto.

* missing/x68.c: ditto.

* dln.c (dln_find_exe_r): removed human68k supports.
  (dln_find_1): ditto.

* lib/mkmf.rb: ditto.

* ext/extmk.rb (Init_ext): ditto.

* ext/socket/socket.c (init_sock): ditto.

* gc.c (GC_MALLOC_LIMIT): ditto.
  (rb_setjmp, rb_jmpbuf): ditto.
  (mark_current_machine_context): ditto.

* include/ruby/defines.h (PATH_ENV): ditto.

* io.c: ditto.

* process.c: ditto.

* ruby.c: ditto.

* test/ruby/test_env.rb: ditto.

* test/ruby/test_path.rb: ditto.

* LEGAL


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19677 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-04 13:12:13 +00:00
tadf 0c0e636b19 * lib/date/format.rb: no need to require the "lib/rational.rb".
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19676 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-04 10:22:15 +00:00
naruse a6e736e09d * ext/nkf/nkf.c (rb_nkf_enc_get): don't replicate encoding.
[ruby-dev:36575]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19675 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-04 10:06:26 +00:00
naruse 0b18a77e7d * ext/stringio/stringio.c (strio_external_encoding): defined.
* ext/stringio/stringio.c (strio_internal_encoding): defined.

* ext/stringio/stringio.c (Init_stringio): define above.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19674 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-04 09:56:20 +00:00
yugui 5f898e44a7 * test/mini/test_mini_test.rb: recovered. It had been temporarily removed at r19645.
* test/mini/test_mini_mock.rb: ditto.

* test/mini/test_mini_spec.rb: ditto.

* lib/test/**/*: replaced by miniunit.
  miniunit had been temporarily reverted at r19643 but now recovred.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19673 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-04 07:30:51 +00:00
yugui 279c3cbdbe * common.mk (gdb-ruby): new target. it runs ruby under controlled by
gdb.

* common.mk (dist): accepts RELNAME variable as the second argument of
  make-snapshot.rb.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19672 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-04 06:36:20 +00:00
keiju 0fdc3b4bc5 * lib/irb/irb/ext/save-history.rb: change load_history using File.expand_path. see [ruby-dev:36660]. Thanks Kouhei Sutou.
* lib/irb/irb/context.rb: convert string Symbol of instance variable names in IRB:Context#inspect.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19670 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-04 03:26:16 +00:00
yugui 3ac20b9590 * ext/dl/extconf.rb ($distcleanfiles): added callback-?.c into
the distclean list.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19667 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-03 15:49:39 +00:00
naruse be93ac50db * ext/json/lib/json/pure.rb (module JSON): remove Iconv dependency.
* ext/json/lib/json/pure/generator.rb (utf8_to_json): process as
  binary and remove Iconv dependency.

* ext/json/lib/json/pure/parser.rb (parse_string): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19666 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-03 10:36:10 +00:00
usa bfdadb885a * win32/{configure.bat,setup.mak,Makefile.sub): add --program-prefix
configure option support.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19664 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-03 05:04:57 +00:00
xibbar 10e9b63806 * lib/cgi/core.rb (CGI::QueryExtension): delete MorphingBody
and replace like as 1.8's in multipart reading.
  see [ruby-dev:36443],
  reference from CGIAlt http://cgialt.rubyforge.org/
* test/cgi/test_cgi_multipart.rb : fixed multipart test.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19663 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-02 12:37:30 +00:00
akr bd421aa2d2 * string.c (rb_str_sub_bang): fix coderange.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19662 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-02 11:46:40 +00:00
mame 179b7eaa6b * lib/rexml/parsers/lightparser.rb, lib/debug.rb: remove unused when
clauses.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19658 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-01 13:55:08 +00:00
mame 46321a9a31 * lib/xmlrpc, lib/rexml, test/ruby/test_array.rb,
test/ruby/test_unicode_escape.rb, test/scanf/test_scanf.rb,
  test/rss/rss-assertions.rb: fix indentation to remove warning.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19657 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-01 13:46:53 +00:00
nobu 952385b712 * gc.c (rb_gc_call_finalizer_at_exit): finalize deferred IO and Data.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19656 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-01 12:36:38 +00:00
nobu 837d3aa882 * gc.c (rb_gc_call_finalizer_at_exit): deffers IO finalization.
[ruby-dev:36646]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19654 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-01 10:13:57 +00:00
nobu 1d54761948 * marshal.c (marshal_dump): fixed for check_dump_arg.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19653 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-01 10:11:51 +00:00
nobu 7558136984 * marshal.c (marshal_dump): initializes dump_arg before any funcall.
[ruby-dev:36648]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19652 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-01 09:57:38 +00:00
matz 414605560f * io.c (rb_io_extract_modeenc): should honor value of the
textmode: and binmode: options.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19650 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-30 17:55:25 +00:00
matz d370a79c69 * string.c (rb_str_split_m): should use rb_str_subseq() which use
offset and length by bytes.  [ruby-dev:36641]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19649 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-30 16:18:27 +00:00
mame a75eadef3b * test/ruby/test_settracefunc.rb (test_call, test_class): line number
was changed at r19592.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19648 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-30 15:31:06 +00:00
akr 252255cad4 * process.c (check_exec_redirect): don't depend on rb_stdout and
rb_stderr.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19646 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-30 15:21:30 +00:00
yugui 888072261f Temporarily removed test/mini/* because they depend on the minitest version
of test/unit, which had been reverted.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19645 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-30 14:13:33 +00:00
yugui 870b93ae9e Reverts the changes of lib/test/unit.rb in r19502 and r19501.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19644 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-30 14:13:23 +00:00
yugui 1af1196616 Reverts the changes of lib/test/unit/* in r19543, r19534 and r19503.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19643 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-30 14:13:12 +00:00
matz 1eeb3e151e * test/bigdecimal/test_bigdecimal.rb (test_sqrt_bigdecimal): wrong
precision specification.  a patch from TAKANO Mitsuhiro
  <takano32 at jus.or.jp> in [ruby-dev:36634].

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19642 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-30 08:06:20 +00:00
matz 8bfa0ac869 * sprintf.c (rb_str_format): add %<name>s style named argument
support.  a patch from Yusuke Endoh <mame at tsg.ne.jp>
  in [ruby-dev:35851].

* sprintf.c (rb_str_format): add gettext style named format
  (%{name}) support.  inspired by [ruby-dev:35852].

* sprintf.c (GETNAMEARG): should raise KeyError exception when no
  named argument found.

* hash.c (rb_hash_fetch): export fetch function.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19641 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-30 08:01:11 +00:00
nobu 9bcbc90605 * parse.y (stmt): returns non zero. [ruby-dev:36633]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19640 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-30 07:54:02 +00:00
ryan 852dc6d663 Updated miniunit to 4257. This cleans all my tests when run in isolation. I still have failures when run with everything else
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19639 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-30 06:57:34 +00:00
ryan b43dae5873 Updated miniunit to 1.3.0 r4256.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19638 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-30 04:57:06 +00:00