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

36245 Коммитов

Автор SHA1 Сообщение Дата
svn 042a162af1 * 2014-07-27
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46963 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-26 16:13:35 +00:00
nobu ac10d41a67 eval_error.c: quote unprintable
* eval_error.c (rb_print_undef, rb_print_undef_str): quote unprintable
  names.

* eval_error.c (rb_print_inaccessible): ditto

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46962 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-26 16:13:33 +00:00
nobu c56b3d1418 eval_error.c: rb_print_inaccessible
* eval_error.c (rb_print_inaccessible): exract from mnew_from_me()
  in proc.c

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46961 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-26 16:13:21 +00:00
nobu 61fd977798 compile.c: check size
* compile.c (compile_data_alloc): check allocation size and
  integer overflow.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46960 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-26 10:06:49 +00:00
shyouhei 39fd13bc5c * ext/objspace/objspace_dump.c (dump_append): avoid fflush.
because dump_append_string_value() iterates over each chars,
	  fflush()-ing here effectively issues system calls on every single
	  bytes exist in a ruby process.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46959 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-26 08:28:05 +00:00
normal 36b476cd1e struct iseq_compile_data_storage: 16 bytes (from 32) overhead
This reduces the iseq_compile_data_storage header from 32 to 16
bytes on 64-bit systems.

pos and size fields cannot exceed 32-bit sizes due to stack size
limits.  Using a flexible array for the buffer also saves us 8
bytes of pointer overhead.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46958 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-26 07:57:44 +00:00
normal a9c7629ece rb_iseq_t: reduce to (280 bytes from 288 bytes) on 64-bit
iseq_size and line_info_size may be 32-bit.

4GB instruction sequences should be big enough for anyone.
Other existing line info counters are 32-bit, and nobody
should need all that.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46957 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-26 07:30:26 +00:00
nobu 98c9581b03 rbconfig/sizeof: remove garbage
* ext/rbconfig/sizeof/depend: remove garbage dollar mark.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46956 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-26 06:16:19 +00:00
nobu 63f3261e61 rbconfig/sizeof: revert r46924
* ext/rbconfig/sizeof/depend: revert r46924, VPATH prefix, to fix
  build error on old FreeBSD.  NMAKE must die.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46955 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-26 04:10:25 +00:00
normal 6358bae370 struct parse_params: trivial packing
* parse.y (struct parse_params): shrink to 320 to 304 bytes on 64-bit

Some elements may be removed/resized as well, but not as important
as reducing more-frequently allocated structures.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46954 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-25 21:47:20 +00:00
normal 36c1e06c93 ChangeLog: add references [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46953 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-25 21:36:58 +00:00
normal 48a2b96d2b introduce ZALLOC{,_N} to replace ALLOC{,_N}+MEMZERO use
Using calloc where possible reduces code and binary sizes.

* include/ruby/ruby.h (ZALLOC, ZALLOC_N): implement
  (Data_Make_Struct, TypedData_Make_Struct):
  ZALLOC replaces ALLOC+memset
* compile.c (iseq_seq_sequence): ZALLOC_N replaces ALLOC_N+MEMZERO
* cont.c (fiber_t_alloc): ZALLOC replaces ALLOC+MEMZERO
* io.c (rb_io_reopen): ditto
* iseq.c (prepare_iseq_build): ditto
* parse.y (new_args_tail_gen, parser_new, ripper_s_allocate): ditto
* re.c (match_alloc): ditto
* variable.c (rb_const_set): ditto
* ext/socket/raddrinfo.c (get_addrinfo): ditto
* ext/strscan/strscan.c (strscan_s_allocate): ditto
* gc.c (rb_objspace_alloc): calloc replaces malloc+MEMZERO

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46952 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-25 21:34:35 +00:00
svn 5c094d381b * 2014-07-26
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46951 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-25 20:57:15 +00:00
normal 098c9a327f symbol.c (dsymbol_check): remove unneeded semi-colon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46950 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-25 20:57:02 +00:00
nobu d4e84dd0bf test/ripper/test_scanner_events.rb: fill empty test methods
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46949 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-25 11:22:49 +00:00
nobu 861b7d781e fix encoding spec
"UTF-8" is invalid encoding name in Emacs, use "utf-8" instead.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46948 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-25 07:55:58 +00:00
nobu ad989e5521 rubygems/util.rb: redirect options
* lib/rubygems/util.rb (Gem.silent_system): use keyword options to
  redirect outputs instead of reopening global IOs.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46947 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-25 07:55:55 +00:00
nobu 892a97ebeb specification.rb: fix leaked FDs
* lib/rubygems/specification.rb (build_extensions): close
  redirection FDs.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46946 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-25 07:55:52 +00:00
nobu 3f818a33a8 rubygems/util.rb: fix leaked FDs
* lib/rubygems/util.rb (silent_system): close duplicated IOs.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46945 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-25 07:55:48 +00:00
nobu a818740553 remote_fetcher.rb: fix leaked FDs
* lib/rubygems/remote_fetcher.rb (request): close connections.

* lib/rubygems/request.rb (close): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46944 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-25 07:55:42 +00:00
nobu 895c1ce477 test_gem_remote_fetcher.rb: fix leaked FDs
* test/rubygems/test_gem_remote_fetcher.rb (start_server):
  shutdown remote servers.

* test/rubygems/test_gem_remote_fetcher.rb (start_ssl_server):
  ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46943 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-25 07:55:30 +00:00
nobu ebed2ef335 test_gem_silent_ui.rb: fix leaked FDs
* lib/rubygems/user_interaction.rb (Gem::StreamUI#close): clean up
  IOs.

* test/rubygems/test_gem_silent_ui.rb (TestGemSilentUI#teardown):
  fix leaked FDs.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46942 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-25 06:53:31 +00:00
nobu 3b26b3898e leakchecker.rb: temporary measure againt WEBrick
* test/lib/leakchecker.rb (LeakChecker#find_threads): temporary
  measure for unrestartable WEBrick::Utils::TimeoutHandler::Thread.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46941 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-25 06:53:27 +00:00
nobu 14cea0d712 test/unit.rb: temporary measure againt minitest
* test/lib/test/unit.rb (deal): temporary measure for mixing
  output from the tests of minitest in parallel test.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46940 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-25 06:53:16 +00:00
ko1 41929aa6b6 * gc.c: change objspace::rgengc::parent_object_is_old (boolean)
to objspace::rgengc::parent_object (VALUE).
  Use Qfalse or RVALUE pointer instead of FALSE and TRUE.
* gc.c (gc_marks_body): should clear parent_object just before
  gc_mark_roots() because there are no parents objects
  for root objects.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46939 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-25 05:12:06 +00:00
ko1 61a2893457 * gc.c (rb_gc_writebarrier_remember_promoted): should remember only
OLD objects on RGENGC_AGE2_PROMOTION.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46938 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-25 04:47:48 +00:00
ko1 009bf7be44 * gc.c (gc_mark_stacked_objects): fix error message.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46937 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-25 04:43:09 +00:00
charliesome c3cbfa417b ChangeLog: reference GitHub pull request
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46936 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-25 04:19:51 +00:00
charliesome 73ac899b7f * ext/socket/socket.c (sock_gethostname): Use NI_MAXHOST to support
hostnames longer than 64 characters if the system supports it.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46935 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-25 04:17:50 +00:00
nobu 97e37d6805 compile.c: make the receiver condition cleaner
* compile.c (defined_expr): make the condition if the receiver
  is explicit or implicit cleaner.  [fix GH-681]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46934 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-25 03:21:12 +00:00
drbrain e7ce17cfe8 * doc/keywords.rdoc: [DOC] Describe each keyword.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46933 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-24 18:54:13 +00:00
svn 3d998c9a66 * 2014-07-25
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46932 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-24 15:28:16 +00:00
nobu be7c04e197 parse.y: dynamic const assign_error in ripper
* parse.y (mlhs_node): dynamic constant assignment in massign
  should cause assign_error, like as single assign and backref
  assignment in massign.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46931 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-24 15:28:14 +00:00
nobu 418c46f284 parse.y: move common code
* parse.y (arg, primary): move common code shared with ripper.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46930 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-24 15:28:01 +00:00
suke 6d877a9341 * ext/win32ole/win32ole.c (Init_win32ole): add WIN32OLE_RECORD#initialize
method.

* ext/win32ole/win32ole.c (ole_val2variant): convert WIN32OLE_RECORD
  object to VT_RECORD variant.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46929 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-24 13:51:22 +00:00
ngoto 6af209e451 * ext/rbconfig/sizeof/depend (sizes.c): fix build failure since r46924.
[Bug #10089] [ruby-dev:48446]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46928 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-24 12:14:27 +00:00
ko1 c90cd20cc4 * gc.c: fix major GC flags.
* add GPR_FLAG_MAJOR_BY_FORCE, which indicates
    major GC by METHOD, CAPI and so on (see GC_BY).
  * remove GPR_FLAG_MAJOR_BY_RESCAN because not used.
  * remove GPR_FLAG_MAJOR_BY_STRESS, use FORCE instead.
* test/ruby/test_gc.rb: catch up.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46927 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-24 11:13:19 +00:00
nobu 4cd0471178 parse.y: remove garbage
* parse.y (assoc): remove garbage semicolon added by r35489.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46926 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-24 08:22:17 +00:00
ngoto 834eb1a8f6 * include/ruby/io.h (struct rb_io_buffer_t): PACKED_STRUCT should not
be used for platform-specific optimization. PACKED_STRUCT_UNALIGNED
  should be used. [ruby-core:63988] [Bug #10088]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46925 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-24 07:03:38 +00:00
nobu 92705750d3 rbconfig/sizeof: VPATH prefix
* ext/rbconfig/sizeof/depend (sizes.c): prefix with nmake-style
  VPATH to use the distributed source in out-of-place builds.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46924 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-24 00:59:51 +00:00
svn 0982133566 * properties.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46923 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-23 19:45:12 +00:00
hsbt 8fded5ba3e * lib/benchmark.rb: split executable code into sample directory.
* sample/benchmark.rb: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46922 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-23 19:45:09 +00:00
svn 7d8175a2dc * properties.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46921 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-23 19:44:30 +00:00
hsbt a7f672a17e * lib/tempfile.rb: split executable code into sample directory.
* sample/tempfile.rb: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46920 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-23 19:44:23 +00:00
svn 31f2d1d7eb * properties.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46919 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-23 19:31:36 +00:00
svn d2864212cd * 2014-07-24
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46918 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-23 19:31:30 +00:00
hsbt e32e0a2d3d * lib/pstore.rb: split executable code into sample directory.
* sample/pstore.rb: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46917 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-23 19:31:18 +00:00
nobu 63360be4d2 UNALIGNED_WORD_ACCESS on ppc64
* include/ruby/defines.h, siphash.c, st.c (UNALIGNED_WORD_ACCESS):
  add PowerPC64 too, which is capable to access unaligned words.
  patched by Gustavo Frederico Temple Pedrosa in [ruby-core:63937].
  [Feature #10081]
* regint.h (PLATFORM_UNALIGNED_WORD_ACCESS): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46915 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-23 14:50:12 +00:00
nobu 6528ad0971 defines.h: PACKED_STRUCT_UNALIGNED
* include/ruby/defines.h (PACKED_STRUCT_UNALIGNED): move from
  configure.in for universal binary.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46914 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-23 14:50:02 +00:00
nobu 3f21aa5d38 configure.in: missing comma
* configure.in (posix_fadvise): fix missing comma separating
  blocks.  [ruby-core:62968] [Bug #9914]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46913 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-23 14:50:00 +00:00