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

41823 Коммитов

Автор SHA1 Сообщение Дата
nobu b3377eaa13 Revert r52995
revert slow atomic operations.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52997 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-09 07:30:44 +00:00
ko1 303cd88d40 * vm.c (rb_vm_cref_in_context): Module#define_method in non-class
expression should be public.
  [Bug #11754]

* test/ruby/test_method.rb: add a test.




git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52996 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-09 07:15:48 +00:00
nobu 0599d7de58 use atomic operations
* regcomp.c (onig_chain_link_add): use atomic operation instead of
  mutex.
* regint.h (ONIG_STATE_{INC,DEC}_THREAD): ditto.
* regparse.c (PopFreeNode, node_recycle): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52995 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-09 06:48:15 +00:00
ko1 e48adae2b3 * gc.c (gc_mark_stacked_objects): fix typo.
reported by XIE Zhibang. [Bug #11763]




git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52994 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-09 05:49:27 +00:00
shugo 6df0853173 * doc/syntax/refinements.rdoc: remove outdated description.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52993 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-09 05:38:31 +00:00
ko1 71a4d189bd update NEWS [ruby-core:71970]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52992 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-09 04:51:29 +00:00
nobu 0d89c6db7e stringio.c: unused variable
* ext/stringio/stringio.c (strio_memsize): remove a variable which
  is no longer used.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52991 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-09 02:43:55 +00:00
ko1 eef8beb695 add documentation for RubyVM::InstructionSequence#to_binary_format and RubyVM::InstructionSequence.from_binary_format
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52990 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-09 02:41:14 +00:00
normal a422462a18 compile.c (ibf_dump_object_unsupported): fix spelling error
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52989 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-09 01:34:01 +00:00
ko1 dff42b0ea0 * ext/**/*.c (*_memsize): same as r52986 for extensions.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52988 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-09 01:01:17 +00:00
hsbt e76567c15b * .gitignore: ignored ISeq binary format.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52987 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-09 00:46:26 +00:00
ko1 2f5b8f0529 * *.c (*_memsize): do not check ptr.
NULL checking is finished Before call of memsize functions.
  See r52979.




git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52986 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-09 00:38:32 +00:00
hsbt 6a15a37f0b * test/net/smtp/test_response.rb: use Test::Unit. We should use Test::Unit
without rubygems and rdoc.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52985 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-09 00:25:34 +00:00
ko1 a78023c118 mark as experimental
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52984 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-09 00:20:57 +00:00
nobu ec74d507fe test_generic.rb: fix assertion
* test/uri/test_generic.rb (test_to_s): use assert_not_predicate.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52983 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-08 23:48:37 +00:00
nobu cf183a58de string.c: use rb_id_encoding
* string.c (rb_str_init): rb_id_encoding() returns same ID with
  caching.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52982 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-08 23:41:27 +00:00
normal f2b9563bb4 lib/uri/generic.rb: enable frozen_string_literal
* lib/uri/generic.rb: enable frozen_string_literal
  (split_userinfo): remove explicit .freeze for string literals
  (check_path): ditto
  (query): ditto
  (fragment): ditto
  (to_s): ditto
  [ruby-core:71910] [Bug #11759]

Patch-by: Colin Kelley <colindkelley@gmail.com>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52981 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-08 21:28:26 +00:00
normal 0df938d5be test/uri/test_generic.rb (to_s): new test
Ensure URI::Generic#to_s continues to return mutable strings to
prevent breakage when we enable frozen string literals in future
commits.

[ruby-core:71820]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52980 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-08 21:27:34 +00:00
nobu a8fb40db8c gc.c: NULL check at memsize
* gc.c (rb_objspace_data_type_memsize): consider NULL data uses no
  memory without calling dsize function as well as other functions.
  fix SEGV in test/objspace with RUBY_ISEQ_DUMP_DEBUG=to_binary.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52979 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-08 17:28:32 +00:00
ko1 e78bf7976c * compile.c (ibf_dump_memsize): should check NULL.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52978 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-08 17:19:58 +00:00
usa 4466d4baa9 * string.c (rb_str_init): now accepts new option parameter `encoding'.
[Feature #11785]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52976 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-08 16:48:52 +00:00
nobu f679a6b106 envutil.rb: improve message
* test/lib/envutil.rb (assert_ruby_status): show also outputs at
  normal exit.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52972 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-08 16:17:17 +00:00
nobu 745c63e9a0 compile.c: suppress warning
* compile.c (ibf_dump_overwrite): cast to unsigned long to
  suppress sign-compare warning.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52971 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-08 15:59:05 +00:00
nobu 46df9c425e file.c: call get_stat only once
* file.c (rb_stat_wr, rb_stat_ww): call get_stat only once and
  reduce checking struct.  patch by Yuki Kurihara in
  [ruby-core:71949].  [Misc #11789]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52970 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-08 15:52:40 +00:00
ko1 ddba2014c6 * compile.c (iseq_ibf_dump): dump extra data just string length.
* sample/iseq_loader.rb: add using
  RubyVM::InstructionSequence.from_binary_format_extra_data method
  (commented out).




git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52969 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-08 15:30:46 +00:00
nobu 278d90a255 compile.c: fix extra_str
* compile.c (iseq_ibf_load_extra_data): fix offset and
  length of extra_str, which is not NUL-terminated.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52968 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-08 15:26:58 +00:00
yuki 3ba62bde36 gems/bundled_gems: Upgrade the did_you_mean gem to 1.0.0.rc1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52967 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-08 15:23:39 +00:00
ko1 34cfdd2f67 * compile.c (ibf_load_setup): cast to int.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52966 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-08 15:18:30 +00:00
ko1 d0d0898c0a * compile.c (ibf_setup_load): rename to ibf_load_setup().
* compile.c (iseq_load_setup): check binary format.




git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52965 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-08 15:14:55 +00:00
nobu bb4d72c51f make local symbols static
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52964 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-08 15:07:41 +00:00
svn bd7e04e4d7 * 2015-12-09
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52963 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-08 15:05:37 +00:00
kazu 0a2b471d38 fix indent [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52962 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-08 15:05:37 +00:00
kazu 122ee7d4c2 Add ticket numbers [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52961 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-08 15:05:13 +00:00
nobu 2c3f0749c5 free ibf_dump at exception
* compile.c (iseq_ibf_dump): wrap ibf_dump to free tables at
  exception.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52960 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-08 14:50:55 +00:00
kazu c01f1655be fix typos [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52959 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-08 14:49:29 +00:00
nobu 433a5b4693 compile.c: make opt a string value
* compile.c (iseq_ibf_dump): rb_check_string_type() returns nil if
  the object does not have to_str method.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52958 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-08 14:47:38 +00:00
ngoto d573666e62 * test/io/console/test_io_console.rb (run_pty): Avoid waiting twice
for a process. Fix Errno::ECHILD in TestIO_Console#test_close and
  TestIO_Console#test_sync.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52957 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-08 14:33:29 +00:00
nobu 6ee61d4bb9 check loading object index range
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52956 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-08 14:33:11 +00:00
nobu 6a105387ce suppress warnings
* compile.c (iseq_ibf_dump): check lenght overflow.

* vm_core.h (rb_iseq_check): suppress unused-value warnings.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52955 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-08 14:12:11 +00:00
ko1 b8574cdcff * compile.c (iseq_ibf_dump): fix for clang type checker.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52954 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-08 14:06:13 +00:00
ko1 23124ffbe8 * iseq.c (iseq_s_load): fix mysterious bug.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52953 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-08 14:05:44 +00:00
kazu 99c89fa56a fix a typo [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52952 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-08 14:03:44 +00:00
svn d0f29abb0e * properties.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52951 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-08 13:59:39 +00:00
svn c49cb7fed4 * remove trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52950 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-08 13:59:15 +00:00
ko1 3dbb390180 * introduce new ISeq binary format serializer/de-serializer
and a pre-compilation/runtime loader sample.
  [Feature #11788]

* iseq.c: add new methods:
  * RubyVM::InstructionSequence#to_binary_format(extra_data = nil)
  * RubyVM::InstructionSequence.from_binary_format(binary)
  * RubyVM::InstructionSequence.from_binary_format_extra_data(binary)

* compile.c: implement body of this new feature.

* load.c (rb_load_internal0), iseq.c (rb_iseq_load_iseq):
  call RubyVM::InstructionSequence.load_iseq(fname) with
  loading script name if this method is defined.

  We can return any ISeq object as a result value.
  Otherwise loading will be continue as usual.

  This interface is not matured and is not extensible.
  So that we don't guarantee the future compatibility of this method.
  Basically, you should'nt use this method.

* iseq.h: move ISEQ_MAJOR/MINOR_VERSION (and some definitions)
  from iseq.c.

* encoding.c (rb_data_is_encoding), internal.h: added.

* vm_core.h: add several supports for lazy load.
  * add USE_LAZY_LOAD macro to specify enable or disable of
    this feature.
  * add several fields to rb_iseq_t.
  * introduce new macro rb_iseq_check().

* insns.def: some check for lazy loading feature.

* vm_insnhelper.c: ditto.

* proc.c: ditto.

* vm.c: ditto.

* test/lib/iseq_loader_checker.rb: enabled iff suitable
  environment variables are provided.

* test/runner.rb: enable lib/iseq_loader_checker.rb.

* sample/iseq_loader.rb: add sample compiler and loader.

    $ ruby sample/iseq_loader.rb [dir]

  will compile all ruby scripts in [dir].
  With default setting, this compile creates *.rb.yarb files
  in same directory of target .rb scripts.

    $ ruby -r sample/iseq_loader.rb [app]

  will run with enable to load compiled binary data.




git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52949 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-08 13:58:50 +00:00
nobu 8f620b9b17 retry IO#getpass
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52948 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-08 13:26:56 +00:00
kazu dc331ca5c0 mention about Enumerator::Lazy#grep_v in NEWS
* NEWS: mention about Enumerator::Lazy#grep_v.
  [ruby-core:71845] [Feature #11773]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52947 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-08 12:31:28 +00:00
kazu 5f7d6c0ce9 Revert r52907 "* configure.in: add missing x."
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52946 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-08 12:20:25 +00:00
naruse 958e153cdb Revert r52902,r52903,r52910,r52911,r52937,r52939
Reject IO::Console#getpass because it can't test portablly.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52945 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-08 10:54:42 +00:00
duerst d9c6135c5b string.c: removed unused variable
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52944 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-08 08:36:43 +00:00