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

27295 Коммитов

Автор SHA1 Сообщение Дата
tenderlove d3e0fe6b2f Added a test for CoW strings.
by John Shahid <jvshahid@gmail.com>
https://github.com/ruby/ruby/pull/148

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36808 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-23 21:14:31 +00:00
kazu a7208d2a81 * common.mk: support `make id.h` without `rm .id.h.time` after `rm id.h`.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36807 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-23 12:05:45 +00:00
kazu 1c9ba83303 fix typos
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36806 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-23 12:05:42 +00:00
naruse 180a2fbf9d Test for r36803's singleton_class_of.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36805 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-23 11:58:39 +00:00
usa 1e73d66f6b * test/ruby/test_fixnum.rb (TestFixnum#test_singleton_method): new test.
* test/ruby/test_bignum.rb (TestBignum#test_singleton_method): ditto.

* test/ruby/test_float.rb (TestFloat#test_singleton_method): ditto.

* test/ruby/test_symbol.rb (TestSymbol#test_singleton_method): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36804 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-23 11:51:30 +00:00
usa 6a80947a4b * class.c (singleton_class_of): flonum can't have singleton class.
* vm.c (vm_define_method): flonum can't have singleton method.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36803 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-23 11:36:42 +00:00
usa b2ea5504bc * common.mk (win32/*): macro RUBY_H_INCLUDES is not defined there,
so need to move denendency rules under the definition of it.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36802 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-23 10:20:37 +00:00
usa 44a7c87076 * win32/Makefile.sub: refactoring. remove unused rules, and update
some rules which are not used usually to fit current macros.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36801 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-23 10:18:23 +00:00
nobu c68d29960b load.c: keep encoding of feature name
* file.c (rb_find_file_ext_safe, rb_find_file_safe): default to
  US-ASCII for encdb and transdb.
* load.c (search_required): keep encoding of feature name.  set
  loading path to filesystem encoding.  [Bug #6377][ruby-core:44750]
* ruby.c (add_modules, require_libraries): assume default external
  encoding as well as ARGV.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36800 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-23 07:46:12 +00:00
nobu 2933909caf remove trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36799 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-23 07:45:46 +00:00
ko1 b3b5e626ad * include/ruby/ruby.h: introduce flonum technique for
64bit CPU environment (sizeof(double) == sizeof(VALUE)).
  flonum technique enables to avoid double object creation
  if the double value d is in range about between
  1.72723e-77 < |d| <= 1.15792e+77 or 0.0.
  flonum Float value is immediate and their lowest two bits
  are b10.
  If flonum is activated, then USE_FLONUM macro is 1.
  I'll write detailed in this technique on
  https://bugs.ruby-lang.org/projects/ruby-trunk/wiki/Flonum_tech
* benchmark/bmx_temp.rb: add an benchmark for simple
  Float calculation.
* gc.c (id2ref, rb_obj_id): add flonum Float support.
* include/ruby/intern.h: move decl of rb_float_new(double)
  to include/ruby/ruby.h.
* insns.def, vm.c, vm_insnhelper.c: add flonum optimization
  and simplify source code.
* vm_insnhelper.h (FLONUM_2_P): added.
* marshal.c: support flonum output.
* numeric.c (rb_float_new_in_heap): added.
* parse.y: support flonum.
* random.c: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36798 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-23 07:22:40 +00:00
usa ce5af582a0 * lib/mkmf.rb (create_makefile): add dependency to header files when
depend files don't exist.  now we can remove simple (and often
  wrong) depend files in most cases.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36797 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-23 07:15:27 +00:00
ko1 3721fb0106 * ext/date/depend: add dependency to $(ruby_headers).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36796 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-23 07:03:46 +00:00
shugo 55cf24d378 * insns.def (invokesuper): reverted r36640 partially to make super
in a thread work correctly. [ruby-core:47284] [Bug #6907]

* test/ruby/test_super.rb: related test.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36795 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-23 04:00:25 +00:00
usa 742a0d164e * win32/configure.bat: added help message of --with(out)?-ext.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36794 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-23 03:33:53 +00:00
usa 7370aa3126 * win32/configure.bat: support --with(out)?-ext(ensions) options.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36793 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-23 03:30:58 +00:00
naruse f896ad3b49 * configure.in: Fixing Haiku build.
- -lbe is not required for linking
  - stack protector doesn't work for now because of the default gcc's bug
  by Takashi Toyoshima <toyoshim@gmail.com>
  https://github.com/ruby/ruby/pull/167

* signal.c (ruby_signal): haiku doesn't have SIGBUS.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36791 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-23 02:59:24 +00:00
usa a394604412 * test/open-uri/test_open-uri.rb (TestOpenURI#test_read_timeout): this
test expects that the server thread will be killed in sleep, but 0.01
  sec is too short to reach there.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36790 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-23 02:35:01 +00:00
naruse ea16237c61 * configure.in: use the value of --with-opt-dir on building ruby
itself. [ruby-dev:46064] [Bug #6900]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36788 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-23 01:50:12 +00:00
usa bae282bc74 * common.mk (ID_H_TARGET): revert a part of r36724 and r36751. they
break mswin build from clean source.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36787 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-23 01:38:14 +00:00
tenderlove 5571c7315e * ext/syck: removed. Fixes [ruby-core:43360]
* test/syck: removed.

* lib/yaml.rb: only require psych, show a warning if people try to set
  the engine to syck.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36786 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-22 17:43:16 +00:00
svn b8910f3751 * 2012-08-23
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36785 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-22 16:51:13 +00:00
tenderlove 51a41dd056 * insns.def: search up the cf stack for an object that is an instance
of the recipient class.  Fixes [ruby-core:47186]

* test/ruby/test_super.rb: related test.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-22 16:51:08 +00:00
tadf c069246931 * ext/date/date_core.c: [ruby-core:47266].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36783 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-22 10:47:05 +00:00
tadf 280681f40c * ext/date/date_core.c: [ruby-core:47226].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36782 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-22 10:42:15 +00:00
nobu 69d6a825ae lib/mkmf.rb: ruby_headers
* ChangeLog: add missed description of ruby_headers.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36781 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-22 08:04:13 +00:00
nobu 4b448d36ea lib/mkmf.rb: ruby_headers
* lib/mkmf.rb (configuration): extact least ruby headers list as
  ruby_headers.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36780 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-22 07:57:22 +00:00
nobu 7861727ce9 * .travis.yml (before_script): remove -s for debug.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36779 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-22 07:34:20 +00:00
kazu 36f93a0d67 fix a typo
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36778 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-22 06:55:16 +00:00
ko1 051f12d368 fix typo of ChangeLog.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36777 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-22 06:54:20 +00:00
ko1 0a58a564c9 update ChangeLog.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36776 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-22 06:46:31 +00:00
nobu c7ca25a04a * .travis.yml (before_script): debugging for -j.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36775 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-22 06:40:41 +00:00
ko1 d5697825ef * vm_insnhelper.c (vm_setup_method): fix last commit.
[ruby-dev:46065] [Bug #6901]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36774 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-22 06:28:51 +00:00
ko1 d28e07d57b * vm_trace.c: support TracePoint. [ruby-trunk - Feature #6895]
* test/ruby/test_settracefunc.rb: add tests for above.
* proc.c (rb_binding_new_with_cfp): add an internal function.
* vm.c (rb_vm_control_frame_id_and_class): add an internal function.
* vm_trace.c: add rb_add_event_hook2() and rb_thread_add_event_hook2().
  Give us the good name for them!



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36773 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-22 05:12:31 +00:00
shyouhei 22a173df3f * .travis.yml (before_script): Turned out that make -j is broken.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36772 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-22 02:38:55 +00:00
shugo bf797ed9b0 * vm_insnhelper.c (vm_setup_method): should not enable tail call
optimization for frames with VM_FRAME_FLAG_FINISH.
  [ruby-dev:46065] [Bug #6901]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36771 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-22 02:25:16 +00:00
naruse 7a69af7461 * lib/rubygems/test_case.rb: run test with psych if exist.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36770 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-22 02:22:03 +00:00
yugui 1497959ef5 * nacl/pepper_main.c (init_loadpath): Pushes the correct load path on
other architectures than x86_64. Fixes #6873.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36769 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-22 01:14:14 +00:00
yugui 0d05a79bca * configure.in (ac_cv_func_shutdown): shutdown(2) has a dummy
implementation but has no declaration and does not work in
  NativeClient SDK pepper_20.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36768 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-22 01:12:52 +00:00
yugui e782fb8eea * common.mk (vm_backtrace.o): Added missing dependencies.
* ext/nkf/depend (nkf.o): ditto.

* ext/ripper/depend (ripper.o) ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36767 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-22 01:11:30 +00:00
naruse bbb6b5e84e * lib/cgi/util.rb (CGI.escapeHTML): use &#39;
[ruby-core:47221] [Bug #6861]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36766 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-21 22:30:47 +00:00
naruse b0837c440e Suppress warnings
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36765 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-21 22:30:43 +00:00
nobu 8de500cefc bignum.c: keep first zero
* bignum.c (bigdivrem): keep first digit even if zero.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36764 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-21 16:49:00 +00:00
nobu 3d23725ab9 bignum.c: suppress an empty-body warning
* bignum.c (bigdivrem): move decrement to the loop body, to suppress
  an empty-body warning.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36763 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-21 16:40:02 +00:00
nobu 2ed9b46b4f configure.in: noral blocks
* configure.in: use noral blocks instead of dnl, so that matching
  parentheses would match.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36762 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-21 16:18:10 +00:00
svn e32dd8b391 * 2012-08-22
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36761 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-21 16:18:06 +00:00
nobu 5eb9453fc3 configure.in: escape #-marks
* configure.in: escape #-marks, so that matching parentheses would
  match.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36760 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-21 16:18:05 +00:00
nobu 404cc1ae3f configure.in: no bare case statement
* configure.in (RUBY_CHECK_SIZEOF): use single test instead of split
  bare case statement, so that matching parentheses would match.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36759 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-21 16:18:02 +00:00
nobu b78fdf1a82 addr2line.c: suppress warnings
* addr2line.c (fill_lines): check file size overflow only if it is
  necessary, and suppress a sign-compare warning.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36758 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-21 13:32:13 +00:00
ayumin 75e2a26b84 * lib/observer.rb: fix typo.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36757 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-21 13:03:30 +00:00