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

20797 Коммитов

Автор SHA1 Сообщение Дата
drbrain 4061f5b6fc * doc/syntax/modules_and_classes.rdoc: Improved description of methods
on a module or class as suggested by Tobias Buhlmann


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38705 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-05 05:00:33 +00:00
glass 3b983407ef * string.c (rb_str_enumerate_lines): fix invalid byte sequence error
when a separator is passed. The patch is from yoshidam (Yoshida
  Masato).
  [Bug #7646] [ruby-dev:46827]

* test/ruby/test_string.rb: a test for above.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38704 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-05 04:45:32 +00:00
nobu 3caea6b6a2 envutil.rb: check stdout and stderr
* test/ruby/envutil.rb (Test::Unit::Assertions#assert_in_out_err):
  check stdout and stderr both.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38703 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-05 03:25:44 +00:00
drbrain a13aee62d2 * doc/syntax/modules_and_classes.rdoc: Added documentation of syntax
for Modules and Classes.
* doc/syntax/methods.rdoc:  Moved some text to the Modules and
  Classes syntax document.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38701 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-05 01:23:49 +00:00
drbrain 1da85070b0 * doc/syntax/methods.rdoc: Added return values and scope sections,
slightly modified from the original patch.  Fixes #227 from github by
  Dave Brown.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38700 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-04 23:39:48 +00:00
kosaki 753f68cf20 * io.c (rb_cloexec_fcntl_dupfd): improve #ifdef condition.
* io.c (rb_maygvl_fd_fix_cloexec): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38699 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-04 23:23:40 +00:00
drbrain da9fe1c452 * lib/rubygems/commands/cleanup_command.rb: Clean all possible gems
using multiple passes.  Fixes RubyGems bug #422.  Refactored for
  maintainability.
* test/rubygems/test_gem_commands_cleanup_command.rb:  Test for above.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38698 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-04 22:58:15 +00:00
kosaki 03f7f9ea40 * gc.c (vm_xrealloc): add a few comment why we avoid realloc(ptr,0).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38696 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-04 20:05:42 +00:00
kazu db58af6051 fix a typo
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38695 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-04 14:51:08 +00:00
yugui 275a9dcb8c * Makefile.in (RBCONFIG): Moved from common.mk in order to use the
variable in Makefile.in.

* win32/Makefie.sub (RBCONFIG): Ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38694 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-04 11:19:19 +00:00
yugui f9d7df33a1 * common.mk (run, parse): Use BTESTRUBY instead of MINIRUBY to handle
cross-compiling cases, e.g. NativeClient.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38693 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-04 10:47:06 +00:00
yugui ea9301bd2b * common.mk (yes-btest): btest depends on also $(arch)-fake.rb and
rbconfig.rb on building for NativeClient.

* Makefile.in (fake): Avoid generating $(arch)-fake.rb unless cross
  compiling.

* configure.in (CROSS_COMPILING): New substitution.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38692 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-04 09:04:58 +00:00
drbrain 2d08d23e9c * lib/rubygems/doctor.rb: Process directories in order in case the
filesystem doesn't.  [ruby-trunk - Bug #7618]

  Process specifications before other directories in case of bugs.
* test/rubygems/test_gem_doctor.rb:  Test for above.

* lib/rubygems.rb:  Updated version.

* test/rubygems/test_require.rb:  Fixed double require of benchmark.rb.
  RubyGems bug #420.

* test/rubygems/test_gem_commands_check_command.rb:  Fixed unused
  variable warnings.
* test/rubygems/test_gem_commands_query_command.rb:  ditto
* test/rubygems/test_gem_installer.rb:  ditto


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38691 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-04 07:31:57 +00:00
drbrain f3b24b5b7f * lib/rdoc/cross_reference.rb: Fixed matching of C#=== or #===. RDoc
bug #164
* test/rdoc/test_rdoc_cross_reference.rb:  Test for above.

* lib/rdoc/parser/changelog.rb:  Fixed parsing of dates.  RDoc bug #165
* test/rdoc/test_rdoc_parser_changelog.rb:  Test for above.

* lib/rdoc/parser.rb:  Fixed parsing multibyte files with incomplete
  characters at byte 1024.  [ruby-trunk - Bug #6393]
  Fixed handling of -E.  [ruby-trunk - Bug #6392]
* test/rdoc/test_rdoc_options.rb:  Test for above.
* test/rdoc/test_rdoc_parser.rb:  ditto.
* test/rdoc/test_rdoc_parser_c.rb:  ditto.
* test/rdoc/test_rdoc_parser_changelog.rb:  ditto.
* test/rdoc/test_rdoc_parser_markdown.rb:  ditto.
* test/rdoc/test_rdoc_parser_rd.rb:  ditto.
* test/rdoc/test_rdoc_rdoc.rb:  ditto.

* lib/rdoc/tom_doc.rb:  Fixed parsing of [] in TomDoc arguments list.
  RDoc bug #167
* test/rdoc/test_rdoc_tom_doc.rb:  Test for above.

* lib/rdoc.rb:  Update version.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38690 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-04 06:16:13 +00:00
zzak 5a7c4d2a78 * lib/forwardable.rb: Fix rdoc parameters for ::def_single_delegator.
Patch by Vladimir Andrijevik [Github Fixes #230]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38689 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-04 02:52:54 +00:00
zzak 6856d86dc1 typo in ChangeLog
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38688 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-04 02:49:53 +00:00
yugui aa1b87a502 revert r38686 -- duplicate ChangeLog entry
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38687 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-03 15:42:14 +00:00
yugui 05483e020c Fix failures on btest for NativeClient.
* bootstraptest/runner.rb (nacl?): New method to distinguish NaCl
  corss build.

* bootstraptest/test_io.rb: Skip unsupported operations.

* bootstraptest/test_literal.rb: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38686 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-03 15:40:12 +00:00
yugui 6efba755da Fix failures on btest for NativeClient.
* bootstraptest/runner.rb (nacl?): New method to distinguish NaCl
  corss build.

* bootstraptest/test_io.rb: Skip unsupported operations.

* bootstraptest/test_literal.rb: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38684 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-03 15:39:15 +00:00
yugui 0626021e13 * io.c (rb_cloexec_fcntl_dupfd): Fix failures in
bootstrap_test/test_io.rb.  NativeClient does not support F_DUPFD
  but supports dup2(2).

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38683 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-03 15:39:10 +00:00
kou 1fe680e812 * lib/rexml/element.rb (REXML::Elements#add): Remove too much
"elements" in document. Sorry...


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38682 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-03 08:48:22 +00:00
kou ece67a0a12 * lib/rexml/element.rb (REXML::Elements#each): Add missing
"elements" in document. [ruby-talk:402713]
  Reported by Wesley Rishel. Thanks!!!


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38681 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-03 08:44:09 +00:00
zzak 3e028faf7c * ext/psych/lib/psych.rb (Psych.load): Return value of
Psych::SyntaxError.message should be same as example.
  Patch by Ippei Obayashi [ruby-core:51193] [Bug #7636]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38680 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-03 06:13:56 +00:00
zzak e25d55ae08 * lib/forwardable.rb (SingleForwardable): Fix example in overview
Patch by Vladimir Andrijevik [Github Fixes #231]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38679 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-03 05:59:27 +00:00
yugui 6837b808cd * configure.in (OBJCOPY): Fixes build error for NativeClient.
Avoid disabling OBJCOPY for NativeClient.

* thread_pthread.c (rb_reserved_fd_p): USE_SLEEPY_TIMER_THREAD is
  always defined.  Fixes compilation error for NativeClient.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38677 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-03 05:46:29 +00:00
zzak 73bd4c3ff6 typo in r38675 ChangeLog
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38676 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-01 21:06:11 +00:00
zzak 762aa293ca * ext/zlib/zlib.c (Zlib::GzipFile): Fix typo by zed_0xff
[Fixes Github #229]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38675 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-01 18:10:34 +00:00
zzak 663613a993 * hash.c (rb_hash_update): Revert documentation from r38672
See: https://github.com/ruby/ruby/pull/228#issuecomment-11791013


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38674 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-01 17:28:47 +00:00
zzak 1290747cfb * hash.c (rb_hash_update): Documentation for Hash#merge and shallow
copies Patch by Yorick Peterse [Fixes Github #228]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38672 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-01 17:17:28 +00:00
kazu 78ac68e8aa fix typos
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38667 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-01 09:24:15 +00:00
zzak 7e62b6cccf * vm_backtrace.c: Add documentation for Kernel#caller_locations,
Kernel#caller, and Thread::Backtrace::Location


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38666 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-31 06:09:57 +00:00
zzak e4be7f9772 * test/ruby/test_backtrace.rb: Add test for r37957 [Feature #7434]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38664 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-31 04:03:55 +00:00
nobu 77df5bb1b5 parse.y: escaped closing parenthsis
* parse.y (simple_re_meta): escaped closing parenthsis has different
  meaning.  [Bug #7610] [ruby-core:51088]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38663 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-30 14:33:38 +00:00
charliesome c56eee05c6 * configure.in: use 4 argument form of AC_CHECK_HEADERS to force
autoconf to use compiler's result

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38660 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-30 03:11:17 +00:00
ktsj 2a4e4d8673 * test/ruby/test_keyword.rb: add a test for passing hash
as a last argument. [ruby-dev:46712] [Bug #7529]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38658 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-30 02:06:32 +00:00
ktsj 371c07f2a2 * vm_insnhelper.c: set keyword hash on Proc/block calls.
[ruby-core:51172] [Bug #7630]

* test/ruby/test_keyword.rb: add tests for above.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38657 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-30 02:06:28 +00:00
keiju b0767cf8c0 * lib/irb/completion.rb: treat rightly comletion for symbol on irb
[Bug #7632].



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38656 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-29 12:59:06 +00:00
shugo cdabc58f8e * ext/curses/curses.c (window_cury, window_curx, window_maxy,
window_maxx, window_begy, window_begx): use RB_UNUSED_VAR()
  to suppress unused-but-set-variable warnings.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38655 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-29 12:54:41 +00:00
zzak fd636ef99b * iseq.c (RubyVM::InstructionSequence): rdoc formatting
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38651 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-29 07:44:54 +00:00
zzak 1ddf183353 * iseq.c (RubyVM::InstructionSequence): Add rdoc for new iseq features
added from r38085, this includes ::of, #path, #absolute_path,
  #label, #base_label, #first_lineno, and #inspect


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38650 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-29 06:29:47 +00:00
zzak 4706171d27 * iseq.c (rb_iseq_line_trace_all, rb_iseq_line_trace_specify): Add
rdoc for experimental C level api of iseq, from r38076


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38649 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-29 05:09:18 +00:00
nobu ad6f06aed8 object.c: singleton class clone
* object.c (rb_obj_clone): attach clone to its singleton class during
  cloning singleton class so that singleton_method_added will be called
  on it.  based on the patch by shiba (satoshi shiba)[Bug #5283] in
  [ruby-dev:44477].  [Bug #5283]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38648 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-29 02:37:47 +00:00
nobu 2eb92b143a configure.in: AC_CHECK_HEADERS
* configure.in (crt_externs.h): use standard macro AC_CHECK_HEADERS.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38645 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-29 01:10:41 +00:00
charliesome af35f2a61d * configure.in: check for the whether crt_externs.h is present when compiling
for darwin (this header is missing in the iOS SDK)
* eval_intern.h: check HAVE_CRT_EXTERNS_H before including crt_externs.h, if
  not defined, include missing/crt_externs.h instead
* hash.c: ditto
* missing/setproctitle.c: ditto
* missing/crt_externs.h: declare _NSGetEnviron() function and define environ
  for iOS

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38644 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-28 14:23:25 +00:00
keiju 80b0c6ca3b * lib/irb/context.rb: IRB::Context#new: Check from JobManager
inside IRB namespace [Bug #7628]. Thanks rafaelfranca for bug
	  report and its patch.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38643 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-28 12:49:19 +00:00
knu 7bc4cfe479 ruby-electric.el (ruby-electric-curlies): Automatically indent "}".
* misc/ruby-electric.el (ruby-electric-curlies): Automatically
  indent closing curly brackets when
  ruby-electric-newline-before-closing-bracket is true.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38642 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-28 08:10:01 +00:00
kazu 7c7a3c4d96 fix typos
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38641 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-28 03:34:12 +00:00
nobu 0ea1e43174 vm_insnhelper.c: no splat single opt arg
* vm_insnhelper.c (vm_yield_setup_block_args): pass single argument to
  single optional parameter unchanged without splatting.  [Bug #7621]
  [ruby-dev:46801]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38639 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-28 02:50:57 +00:00
shugo d5a39c0aa8 * proc.c (method_eq): fix the documentation to refer to owner.
[ruby-core:51105] [Bug #7613]

* test/ruby/test_method.rb (test_alias_onwer): new test to confirm
  that `a == b' returns false if owners of a and b are different.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38638 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-28 02:23:11 +00:00
nobu bab92f0fea * ChangeLog: fix indent broen at r38633 and tabify.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38637 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-28 00:19:03 +00:00