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

30296 Коммитов

Автор SHA1 Сообщение Дата
nobu 1d42889c4e ext/depend: fix dependency
* ext/depend (ENCOBJS, TRANSOBJS): fix header dependency, VPATH has
  $(srcdir)/include/ruby but not $(srcdir)/include, so cannot find out
  ruby/ruby.h.  use ruby.h instead and ../ruby for include/ruby.h.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40186 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-08 14:09:42 +00:00
yugui 4fe59003f0 * ext/depend (ENCOBJS, TRANSOBJS): Add missing dependencies.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40185 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-08 11:31:38 +00:00
nobu 311960cdaf win32ole.c: check arity
* ext/win32ole/win32ole.c (fole_missing): should check actual argument
  count before accessing.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40184 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-08 08:19:32 +00:00
yugui 418b8e121c Fixes a build failure of ext/ripper/ripper.c on building out of place.
* common.mk (id.h, id.c): Always generated in $(srcdir).
(ext/ripper/ripper.c): Passes $(PATH_SEPARATOR) too to the sub make.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40183 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-08 07:10:18 +00:00
nobu 6779f24eb5 test_curses.rb: add sentinel
* test/test_curses.rb (TestCurses#run_curses): add sentinel to get rid
  of read pty output after the child process terminated, which causes
  EIO on Linux.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40182 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-08 05:12:08 +00:00
xibbar 5865e7604c * lib/cgi/util.rb (CGI::unescapeHTML): fix Hexadecimal numeric character.
[Bug #8183]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40181 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-08 04:06:39 +00:00
naruse a48f99ce5c Suppress warnings
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40180 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-08 03:08:03 +00:00
svn 0851b4c0fc * 2013-04-08
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40179 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-08 03:05:21 +00:00
naruse ae13ab2466 * object.c (rb_obj_ivar_set): call to_str for string only once.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40178 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-08 03:05:15 +00:00
naruse 6cb682a480 * object.c (rb_mod_const_set): call to_str for string only once.
to_str was called from rb_is_const_name and rb_to_id before.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40175 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-07 12:28:21 +00:00
naruse d9ff5c2230 * object.c (rb_mod_cvar_set): call to_str for string only once.
to_str was called from rb_is_class_name and rb_to_id before.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40174 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-07 12:18:26 +00:00
kazu 875bba3fc5 Regexp.escape(RUBY_PLATFORM)
* test/ruby/test_require.rb (TestRequire#test_require_nonascii_path):
  RUBY_PLATFORM should escape as Regexp,
  because RUBY_PLATFORM may contain '.'.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40173 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-07 05:11:24 +00:00
akr 1f32d09523 * include/ruby/defines.h: Simplify the logic to include sys/select.h.
This fixes a compilation error on Haiku (gcc2 and gcc4).

* configure.in: Use shared linker as $(CC) for Haiku.
  This fixes a build error on Haiku (gcc2).



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40172 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-07 02:00:46 +00:00
akr 672490d08c * lib/resolv.rb (MDNSOneShot#sender): Delete an unused variable.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40171 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-07 01:42:18 +00:00
naruse c73c876d54 * addr2line.c: use more generic type:
* u_char -> unsigned char
  * u_short -> unsigned short
  * u_int -> unsigned int
  * u_long -> unsigned long
  * quad_t -> int64_t
  * u_quad_t -> uint64_t

* addr2line.c (imax): inline is defined by configure.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40170 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-06 19:27:04 +00:00
knu 59eacb45e5 Improve ruby-electric-mode.
* misc/ruby-electric.el (ruby-electric-hash): New electric
  function that expands a hash sign inside a string or regexp to
  "#{}".

* misc/ruby-electric.el (ruby-electric-curlies): Do not insert
  spaces inside when the curly brace is a delimiter of %r, %w,
  etc.

* misc/ruby-electric.el (ruby-electric-curlies): Insert another
  space before a closing curly brace when
  ruby-electric-newline-before-closing-bracket is nil.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40166 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-06 16:43:32 +00:00
akr 14e72b1cde * strftime.c (rb_strftime_with_timespec): Test yday range.
[ruby-core:44088] [Bug #6247] reported by Ruby Submit.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40165 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-06 16:02:46 +00:00
svn 387b42053f * 2013-04-07
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40164 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-06 15:00:48 +00:00
ngoto f70a7cd20f * configure.in (AC_CHECK_HEADERS): atomic.h for Solaris atomic_ops.
* ruby_atomic.h: Skip using Solaris10 atomic_ops on Solaris 9 or earlier if atomic.h is not available. [ruby-dev:47229] [Bug #8228]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40163 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-06 15:00:44 +00:00
akr c4d8cc4eae * lib/resolv.rb: Support LOC resources.
[ruby-core:23361] [Feature #1436] by JB Smith.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40162 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-06 14:52:48 +00:00
ngoto 5427a5df05 * addr2line.c: quad_t and u_quad_t is not available on Solaris.
__inline is not available with old compilers on Solaris.
  [ruby-dev:47229] [Bug #8227]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40161 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-06 14:45:06 +00:00
akr 9791353555 * lib/resolv.rb: Add one-shot multicast DNS support.
[ruby-core:53387] [Feature #8089] by Eric Hodel.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40160 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-06 14:32:34 +00:00
akr 4c1e97226f * lib/resolv.rb (Resolv::DNS.fetch_resource): New method to obtain
full result.
  [ruby-dev:43587] [Feature #4788] proposed by Makoto Kishimoto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40159 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-06 13:16:36 +00:00
akr d818a6ab40 * ext/socket/socket.c (rsock_sys_fail_raddrinfo): Renamed from
rsock_sys_fail_addrinfo.
  (rsock_sys_fail_raddrinfo_or_sockaddr): Renamed from
  rsock_sys_fail_addrinfo_or_sockaddr.

* ext/socket/rubysocket.h: Follow the above change.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40158 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-06 11:21:05 +00:00
akr 67fe038d8f * ext/socket/socket.c (rsock_sys_fail_sockaddr): Takes struct sockaddr
and socklen_t instead of String object.
  (rsock_sys_fail_addrinfo_or_sockaddr): Follow the above change.

* ext/socket/rubysocket.h (rsock_sys_fail_sockaddr): Follow the above
  change.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40157 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-06 11:04:45 +00:00
nobu c7135ddd2d socket/extconf.rb: RSTRING_SOCKLEN
* ext/socket/extconf.rb (RSTRING_SOCKLEN): macro to cast RSTRING_LEN
  to socklen_t.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40156 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-06 07:58:51 +00:00
nobu 7e4a95cd06 socket.c: suppress warnings
* ext/socket/socket.c (rsock_sys_fail_sockaddr): cast down explicitly
  to suppress warnings.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40155 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-06 07:58:47 +00:00
akr cb302bf351 * ext/socket/rubysocket.h (SockAddrStringValueWithAddrinfo): New macro.
(rsock_sockaddr_string_value_with_addrinfo): New declaration.
  (rsock_addrinfo_inspect_sockaddr): Ditto.
  (rsock_sys_fail_addrinfo): Ditto.
  (rsock_sys_fail_sockaddr_or_addrinfo): Ditto.

* ext/socket/raddrinfo.c (rsock_addrinfo_inspect_sockaddr): Renamed
  from addrinfo_inspect_sockaddr and exported.
  (rsock_sockaddr_string_value_with_addrinfo): New function to obtain
  string and possibly addrinfo object.

* ext/socket/socket.c (rsock_sys_fail_sockaddr): Don't use
  rsock_sys_fail_host_port which is IP dependent.  Invoke
  rsock_sys_fail_addrinfo.
  (rsock_sys_fail_addrinfo): New function using
  rsock_addrinfo_inspect_sockaddr.
  (rsock_sys_fail_addrinfo_or_sockaddr): New function.
  (sock_connect): Use SockAddrStringValueWithAddrinfo and
  rsock_sys_fail_addrinfo_or_sockaddr.
  (sock_connect_nonblock): Ditto.
  (sock_bind): Ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40154 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-06 05:50:42 +00:00
akr b1fd376cbf * ext/socket/socket.c (rsock_sys_fail_sockaddr): Delete 2nd argument.
* ext/socket/rubysocket.h (rsock_sys_fail_sockaddr): Follow above
  change.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40153 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-06 04:35:29 +00:00
akr 8c6c73745e * ext/socket/socket.c (rsock_sys_fail_path): Use rb_str_inspect only
for String to avoid SEGV.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40152 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-06 04:14:57 +00:00
akr 24ee6971cc * ext/socket/rubysocket.h (rsock_sys_fail_host_port) Wrap by NORETURN.
(rsock_sys_fail_path): Ditto.
  (rsock_sys_fail_sockaddr): Ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40151 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-06 03:41:01 +00:00
akr 11a9d77286 * ext/socket/socket.c (rsock_sys_fail_path): Use rb_str_inspect if the
path contains a NUL.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40150 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-06 02:50:08 +00:00
akr d933fb2296 * ext/socket: Improve socket exception message to show socket address.
[ruby-core:45617] [Feature #6583] proposed Eric Hodel.

* ext/socket/rubysocket.h (rsock_sys_fail_host_port): Declared.
  (rsock_sys_fail_path): Ditto.
  (rsock_sys_fail_sockaddr): Ditto.

* ext/socket/udpsocket.c (udp_connect): Use rsock_sys_fail_host_port.
  (udp_bind): Ditto.
  (udp_send): Ditto.

* ext/socket/init.c (rsock_init_sock): Specify a string for rb_sys_fail
  argument.
  (make_fd_nonblock): Ditto.
  (rsock_s_accept): Ditto.

* ext/socket/ipsocket.c (init_inetsock_internal): Use
  rsock_sys_fail_host_port.

* ext/socket/socket.c (rsock_sys_fail_host_port): Defined.
  (rsock_sys_fail_path): Ditto.
  (rsock_sys_fail_sockaddr): Ditto.
  (setup_domain_and_type): Use rsock_sys_fail_sockaddr.
  (sock_connect_nonblock): Ditto.
  (sock_bind): Ditto.
  (sock_gethostname): Specify a string for rb_sys_fail argument.
  (socket_s_ip_address_list): Ditto.

* ext/socket/basicsocket.c (bsock_shutdown): Specify a string for
  rb_sys_fail argument.
  (bsock_setsockopt): Use rsock_sys_fail_path.
  (bsock_getsockopt): Ditto.
  (bsock_getpeereid): Refine the argument for rb_sys_fail.

* ext/socket/unixsocket.c (rsock_init_unixsock): Use
  rsock_sys_fail_path.
  (unix_path): Ditto.
  (unix_send_io): Ditto.
  (unix_recv_io): Ditto.
  (unix_addr): Ditto.
  (unix_peeraddr): Ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40149 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-06 02:39:44 +00:00
shirosaki e4283fd39d * test/ruby/test_require.rb (TestRequire#test_require_nonascii_path):
fix load path for encoding to run the test as stand-alone.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40148 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-06 02:30:52 +00:00
nobu 8ee121d060 * test/dtrace/helper.rb (DTrace::TestCase#trap_probe): needs to pass
some paths by environment variables.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40147 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-06 00:59:12 +00:00
nobu 8483e9bd58 * ChangeLog: remove duplicated entry due to git-svn conflict.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40146 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-06 00:56:06 +00:00
nobu c3fcd1b871 pack.c: fix definition order
* pack.c (NATINT_LEN): fix definition order, must be after
  NATINT_PACK.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40145 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-06 00:54:23 +00:00
akr 37872dbf2b add a comment.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40144 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-06 00:10:22 +00:00
akr 0667aac914 Add a comment.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40143 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-05 23:00:59 +00:00
tenderlove 2a58706e2d * ext/psych/lib/psych/visitors/yaml_tree.rb: fix symbol keys in coder
emission.  Thanks @tjwallace
* test/psych/test_coder.rb: test for change

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40142 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-05 18:12:52 +00:00
tenderlove 0cb251e079 change test name to be more helpful
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-05 18:02:22 +00:00
nobu 58709e4e38 * properties.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40140 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-05 17:57:43 +00:00
tenderlove 476a62fbbe * ext/psych/lib/psych/exception.rb: there should be only one exception
base class. Fixes tenderlove/psych #125
* ext/psych/lib/psych.rb: require the correct exception class
* ext/psych/lib/psych/syntax_error.rb: ditto
* ext/psych/lib/psych/visitors/to_ruby.rb: ditto

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40139 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-05 17:55:53 +00:00
nobu 40370296c7 parse.y: "nil" for defined? with empty expression
* parse.y (new_defined): remove all extra parentheses, and return
  "nil" for defined? with empty expression.
  [ruby-core:54024] [Bug #8224]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40138 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-05 17:30:42 +00:00
tenderlove 7a7bb64464 * ext/psych/lib/psych/visitors/to_ruby.rb: correctly register
self-referential strings. Fixes tenderlove/psych #135

* test/psych/test_string.rb: appropriate test.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40137 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-05 17:11:21 +00:00
akr fbb29bc08c * ext/socket/init.c (cloexec_accept): Fix a compile error on
Debian GNU/kFreeBSD.  Consider HAVE_ACCEPT4 is defined
  but SOCK_CLOEXEC is not defined.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40136 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-05 16:40:36 +00:00
shirosaki 07636ed42e * load.c (features_index_add): use rb_str_subseq() to specify C string
position properly to fix require non ascii path.
  [ruby-core:53733] [Bug #8165]

* test/ruby/test_require.rb (TestRequire#test_require_nonascii_path):
  a test for the above.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40135 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-05 15:30:52 +00:00
svn 21d47b7381 * 2013-04-06
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40134 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-05 15:21:07 +00:00
nobu 11391aa01b thread.c: no allocate before deleting
* thread.c (rb_thread_local_aset): no needs to allocate local_storage
  before deleting.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40133 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-05 15:21:02 +00:00
nobu 23335c78d3 configure.in: gcc_major
* configure.in: use gcc_major value.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40132 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-05 14:08:27 +00:00