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

8104 Коммитов

Автор SHA1 Сообщение Дата
akr 94bfd049fd revert the definition of _XOPEN_SOURCE_EXTENDED on HP-UX.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10844 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-09-02 22:23:14 +00:00
akr f80cbcf912 * ext/socket/socket.c (ruby_connect): sockerrlen should be socklen_t.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10843 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-09-02 21:27:16 +00:00
akr c76ff0753e * ext/socket/extconf.rb: check arpa/inet.h for ntohs.
* ext/socket/socket.c: include arpa/inet.h if available.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10842 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-09-02 19:44:42 +00:00
akr b23b5ed620 * ext/curses/curses.c: define _XOPEN_SOURCE_EXTENDED on HP-UX.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10841 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-09-02 19:09:56 +00:00
matz 10a0dea1f5 * string.c (Init_String): undef Symbol#new.
* struct.c (rb_struct_s_def): wrong symbol detection.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10837 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-09-02 15:20:24 +00:00
matz d064c0bf13 * string.c (str_to_id): a bug caused by premature optimization.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10836 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-09-02 15:13:26 +00:00
matz 777aed2b15 2006-09-03
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10835 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-09-02 15:05:30 +00:00
matz ccf5372b25 * object.c (Init_Object): move symbol related code to string.c
* string.c (Init_String): Symbol as subclass of String.

* parse.y (rb_intern2): handle symbol as strings.

* string.c (str_new): substring of symbols are mere strings, not
  symbols.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10834 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-09-02 15:05:27 +00:00
matz 2156870525 * ruby.h (struct RArray): embed small arrays.
(RARRAY_LEN): defined for accessing array members.
  (RARRAY_PTR): ditto.

* array.c: use RARRAY_LEN and RARRAY_PTR.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10833 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-09-02 14:42:08 +00:00
matz 8581164ea6 * eval.c (rb_eval): should handle when in else clause. a patch
from Eric Hodel <drbrain at segment7.net>.  [ruby-core:08662]

* parse.y (primary): wrap with NODE_CASE.  [ruby-core:08663]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10832 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-09-02 14:36:22 +00:00
akr 965b0d3807 * common.mk (ia64.o): use the compiler driver to assemble ia64.s
to use appropriate ABI.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10831 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-09-02 04:26:40 +00:00
nahi 40cefc9844 * lib/soap/generator.rb (SOAP::SOAPGenerator#encode_tag): do not dump
XML attribute which value is nil.  value "" and nil both were dumped
          as 'attr="value"'.  [ruby-dev:29395]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10830 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-09-02 03:11:02 +00:00
nahi 97c6bc5ffd * lib/csv.rb (CSV::IOReader#initialize): use String#[](pos, len)
instead of String#[](idx) to check utf BOM.  follows String#[](idx)
          behavior change of 1.9.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10829 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-09-02 03:06:33 +00:00
akr f7429344aa 2006-09-02
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10826 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-09-01 17:27:26 +00:00
akr e7dae47e8a update modified time.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10825 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-09-01 17:27:25 +00:00
matz a20d60c819 string.c (rb_str_resize): typo fixed
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10824 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-09-01 13:11:16 +00:00
matz ba9066bd84 * ruby.h (RSTRING_EMBED_LEN_MASK): uses 5 bits to support 64bit
environment.  [ruby-dev:29369]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10823 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-09-01 13:08:29 +00:00
matz 9ba4002960 * string.c (rb_str_resize): should copy embedded string to
malloc'ed buffer.  a patch from <nobu at ruby-lang.org> in
  [ruby-dev:29369].  fixed: [ruby-dev:29368]

* string.c (rb_str_ord): use %ld specifier since STRING_LEN() is a
  long.  [ruby-dev:29369]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10822 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-09-01 13:07:05 +00:00
matz 85c476a342 * ext/socket/socket.c (socks_init): typo fixed. a patch from Sven
Klemm <sven at c3d2.de>.  [ruby-core:08770]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10821 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-09-01 12:45:01 +00:00
eban 54b7c5d560 * array.c (rb_ary_shuffle): RDoc fixed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10820 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-09-01 05:24:05 +00:00
nagai c22af575a1 * ext/tk/lib/tk/font.rb: TkFont#current_configinfo() doesn't work on Tcl/Tk8.x.
* ext/tk/lib/tk.rb: update RELEASE_DATE.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10818 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-09-01 05:09:51 +00:00
matz 8cf47d14ab * lib/irb/ruby-lex.rb (RubyLex::getc): should not push nil into
reading buffer (@readed).  reported in
  <http://jarp.does.notwork.org/diary/200608c.html#200608311>.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10817 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-09-01 04:15:45 +00:00
matz 04f01ce2f5 2006-09-01
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10816 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-09-01 04:15:42 +00:00
matz 6a640106d2 * lib/irb/ruby-lex.rb (RubyLex::getc): should not push nil into
reading buffer (@readed).  reported in
  <http://jarp.does.notwork.org/diary/200608c.html#200608311>.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10815 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-09-01 00:37:09 +00:00
nobu 079ec46b4b * lib/mkmf.rb (configuration): follow nil.to_s.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10814 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-08-31 14:59:43 +00:00
usa 974037a542 * eval.c (search_required): use RSTRING_PTR and RSTRING_STR.
* object.c (nil_plus): ditto.

* ext/dl/cptr.c (rb_dlptr_s_to_ptr): ditto.

* ext/openssl/ossl_x509ext.c (ossl_x509extfactory_create_ext): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10813 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-08-31 12:10:08 +00:00
usa 6790891ef0 * ext/Win32API/Win32API.c (Win32API_initialize): use RSTRING_PTR and
RSTRING_LEN.

* ext/tk/stubs.c, ext/tk/tcltklib.c, ext/tk/tkutil/tkutil.c: ditto.

* ext/win32ole/win32ole.c (ole_val2olevariantdata): ditto.

* lib/mkmf.rb (create_makefile): follow nil.to_s.

* win32/resource.rb: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10812 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-08-31 11:56:42 +00:00
usa 5b5e4a6fc1 * file.c (test_identical, rb_file_s_truncate): use RSTRING_PTR and
RSTRING_STR.

* io.c (pipe_open, rb_io_reopen): ditto.

* process.c (proc_spawn_n, rb_spawn): ditto.

* util.c (ruby_add_suffix): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10811 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-08-31 11:24:44 +00:00
matz 54af80844f * ruby.h (struct RString): embed small strings.
(RSTRING_LEN): defined for accessing string members.
  (RSTRING_PTR): ditto.

* string.c: use RSTRING_LEN and RSTRING_PTR.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10810 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-08-31 10:47:44 +00:00
matz 25c50cd193 * ruby.h (struct RString): embed small strings.
(RSTRING_LEN): defined for accessing string members.
  (RSTRING_PTR): ditto.

* string.c: use RSTRING_LEN and RSTRING_PTR.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10809 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-08-31 10:30:33 +00:00
matz 22f249ebd7 * array.c (rb_ary_shuffle_bang): new method.
* array.c (rb_ary_shuffle): ditto.

* random.c (genrand_real): ditto.

* random.c (genrand_int32): export the function.

* random.c (Init_Random): initialize random seed at the
  beginning.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10808 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-08-31 08:24:36 +00:00
nagai b8597ccb1c * ext/tk/lib/tkextlib/blt.rb: double dashes (--) option doesn't work
properly on some versions of BLT (wrong description on the
  manual of `blt::bgexec'?).


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10807 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-08-31 05:58:20 +00:00
why 50068c98ab 2006-08-31
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10806 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-08-31 04:14:55 +00:00
why a6487b236a * eval.c (ruby_init): rename top_cref to ruby_top_cref and export,
along with ruby_cref, for use by the sandbox. [ruby-core:08762]

* node.h: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10805 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-08-31 04:14:53 +00:00
matz b22fc4ebb6 * gc.c (gc_sweep): typo fixed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10802 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-08-30 09:49:41 +00:00
matz e8f43ad081 * object.c (rb_Integer): Integer(nil) should raise TypeError.
[ruby-talk:210205]

* object.c (nil_to_s): no longer returns empty string but "nil".
  [ruby-talk:210205]

* lib/mkmf.rb: avoid COMMON_HEADERS being nil.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10801 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-08-30 09:46:57 +00:00
matz 51525e12b8 * lib/rdoc/parsers/parse_c.rb (RDoc::C_Parser::handle_method):
rdoc documents C module methods as instance methods. a patch in
  [ruby-core:08536].


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10800 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-08-30 09:39:47 +00:00
nobu 2aaf22a9a1 2006-08-30
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10799 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-08-30 03:02:37 +00:00
nobu 59b1cef2f1 * numeric.c (flo_hash): improve collision.
* string.c (rb_memhash): new generic function to calculate hash value
  for memory chunk.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10798 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-08-30 03:02:35 +00:00
nobu 74ef5a647f 2006-08-29
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10797 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-08-29 10:11:29 +00:00
nobu 99bed88c85 * hash.c (rb_hash_s_create): fixed memory leak, based on the patch
by Kent Sibilev <ksruby at gmail.com>.  fixed: [ruby-talk:211233]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10796 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-08-29 10:11:27 +00:00
drbrain 5d7609be1b Document and fix my commit.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10794 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-08-28 02:33:40 +00:00
drbrain 657b626899 Revert.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10793 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-08-28 02:33:04 +00:00
drbrain a4e85a53e5 Add digest.c
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10792 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-08-28 02:32:47 +00:00
drbrain cfdb83349e Make RDoc show up.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10791 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-08-28 02:31:58 +00:00
drbrain 6322272cea Fix call-seq in RDoc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10790 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-08-28 02:31:34 +00:00
drbrain 6e83a71d3b Include attribution
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10789 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-08-27 23:03:20 +00:00
drbrain 92b0eb1f42 More comprehensive tests.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10787 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-08-27 22:52:21 +00:00
drbrain ddec6278cb 2006-08-28
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-08-27 22:25:11 +00:00
drbrain b963ffbf1d Fix documentation submitted by Rick Ohnemus. ruby-Bugs-5529. [ruby-core:08725]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10783 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-08-27 22:25:08 +00:00