mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00

* defs/dtrace.d: new file. defined a dtrace provider "ruby". * include/ruby/ruby.h (LIKELY): moved from vm.c. (UNLIKELY): ditto. (OBJSETUP): probe "object-create". (RUBY_EVENT_RESCUE): new event. * vm_exec.c (DEBUG_ENTER_INSN): embeded a probe insn-entry into it. (DEBUG_END_INSN): insn-return. * vm.c (LIKELY): moved into ruby.h. (UNLIKELY): ditto. (Init_BareVM): embeded a probe "raise" into it. * variable.c (rb_class2name_without_alloc): new utility function. * tool/rbinstall.rb (install?(:ext, :arch, :'ext-arch')): installs dtrace.d if necessary. * thread_pthread.c (add_signal_thread_list): probe "raise". (rb_thread_create_timer_thread): ditto. * thread.c (rb_thread_schedule_rec): probes "thread-enter" and "thread-leave", (thread_start_func_2): ditto. (thread_cleanup_func): probe "thread-term" * lib/mkmf.rb: supports dtrace postprocessor on making an extension. * iseq.c (rb_vm_insn_name): new utility function. (rb_vm_insn_len): ditto. * insns.def (hook): probes "method-etnry", "method-return", "line", and "rescue". * compile.c (iseq_compile_each): adds a trace op for "rescue" probe. * gc.c (garbage_collect): probes "gc-begin" and "gc-end". (obj_free): probe "object-free" (garbage_collect_with_gvl): probe "raise" (negative_size_allocation_error): ditto. (rb_memerror): ditto. * eval.c (rb_rescue2): probe "rescue" (rb_longjmp): probe "raise" * ext/probe/probe.c: new extension for application defined probes. * ext/probe/extconf.rb: ditto. * configure.in (--with-tracing-model): new option to choose a tracing mechanism. (DTRACE): new substitution. name of dtrace(1). (RUBY_TRACING_MODEL): new substitution. (DTRACE_OBJ): ditto. (MINIDTRACE_OBJ): ditto. (GOLFDTRACE_OBJ): ditto. (LIBRUBY_DTRACE_OBJ): ditto. (RUBY_DTRACE_POSTPROCESS): new macro. checks whether the dtrace on the system needs postprocessing. (RUBY_DTRACE_BSD_BROKEN): new macro. checks whether the dtrace supports USDT. * Makefile.in: (DTRACE): new variable. name of dtrace(1). (TRACING_MODEL): new variable. name of the chosen tracing mechanism. (DTRACE_OBJ): same as the one in configure.in. (MINIDTRACE_OBJ): ditto. (GOLFDTRACE_OBJ): ditto. (LIBRUBY_DTRACE_OBJ): ditto. (CPPOUTFILE): new substitution. necessary for generating dtrace.d (trace_none.h): new target for TRACING_MODEL=none (RUBY_H_INCLUDES): appended a header for tracing. (distclean-local): also removes preprocessed version of dtrace.d ($(LIBRUBY_A)): needs $(LIBRUBY_DTRACE_OBJ) if dtrace needs postprocessing. ($(PROGRAM)): ditto. (golf): ditto. (miniruby): ditto. ($(arch_hdrdir)/ruby/dtrace.d): new target. preprocessed verson of defs/dtrace.d. generated if necessary. ($(arch_hdrdir)/ruby/trace_dtrace.h): new target. definition of probes. ($(LIBRUBY_DTRACE_OBJ)): new target. generated if dtrace needs postprocessing. ($(DTRACE_OBJ)): ditto. ($(MINIDTRACE_OBJ)): ditto. ($(GOLFDTRACE_OBJ)): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26235 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
307 lines
7.9 KiB
Text
307 lines
7.9 KiB
Text
= NEWS
|
|
|
|
This document is a list of user visible feature changes made between
|
|
releases except for bug fixes.
|
|
|
|
Note that each entry is kept so brief that no reason behind or
|
|
reference information is supplied with. For a full list of changes
|
|
with all sufficient information, see the ChangeLog file.
|
|
|
|
== Changes since the 1.9.1 release
|
|
=== Library updates (outstanding ones only)
|
|
|
|
* builtin classes
|
|
|
|
* Array
|
|
* new method:
|
|
* Array#sort_by!
|
|
|
|
* Dir
|
|
* new method:
|
|
* Dir.home
|
|
|
|
* Enumerable
|
|
* New methods:
|
|
* Enumerable#join
|
|
* Enumerable#chunk
|
|
* Enumerable#slice_before
|
|
|
|
* Enumerator
|
|
* new methods:
|
|
* Enumerator#peek
|
|
* Enumerator#next_values
|
|
* Enumerator#peek_values
|
|
* Enumerator#feed
|
|
* StopIteration#result
|
|
|
|
* extended methods:
|
|
* #with_index accepts an optional argument that specifies the
|
|
index number to start with, defaulted to 0.
|
|
|
|
* incompatible changes:
|
|
* #rewind now calls the "rewind" method of the enclosed object
|
|
if defined.
|
|
* #next doesn't clear the position at end.
|
|
|
|
* ENV
|
|
* Uses locale's encoding
|
|
|
|
* IO
|
|
* new method:
|
|
* IO#fdatasync
|
|
|
|
* extended methods:
|
|
* IO.pipe can take a block.
|
|
|
|
* new modules:
|
|
* IO::WaitReadable
|
|
* IO::WaitWritable
|
|
They are used to extend non-blocking exceptions.
|
|
|
|
* MatchData
|
|
* New method:
|
|
* MatchData#==
|
|
|
|
* Process
|
|
* extended methods:
|
|
* Process.spawn accepts [:child, FD] for a redirect target.
|
|
|
|
* Random (new library for generating pseudo-random numbers)
|
|
|
|
* String
|
|
* extended methods:
|
|
* string[regexp, name] is supported for named capture.
|
|
|
|
* Time
|
|
* extended feature:
|
|
* time_t restriction is removed to represent before 1901 and after 2038.
|
|
Proleptic Gregorian calendar is used for old dates.
|
|
* Time.new have optional arguments to specify date with time offset.
|
|
* Time#getlocal, Time#localtime have optional time offset argument.
|
|
|
|
* new method:
|
|
* Time#to_r
|
|
|
|
* incompatible changes:
|
|
* The year argument of Time.{utc,gm,local,mktime} is now interpreted as
|
|
the value itself. For example, Time.utc(99) means the year 99 AD,
|
|
not 1999 AD.
|
|
|
|
* Kernel
|
|
* new method:
|
|
* Kernel#require_relative
|
|
|
|
* extended methods:
|
|
* respond_to? can be used to detect methods not implemented.
|
|
For example, Process.respond_to?(:fork) returns false on Windows.
|
|
|
|
* rss
|
|
|
|
* 0.2.4 -> 0.2.7.
|
|
|
|
* RSS::Maker.make
|
|
* raise an exception not returns nil for invalid feed making.
|
|
* requires block.
|
|
|
|
* RSS::Maker.[]
|
|
* new method to return maker class.
|
|
|
|
* RSS::Maker.supported?(version)
|
|
* new method to check whether given version is supported.
|
|
|
|
* RSS::Maker: item.guid.permanent_link?
|
|
* new alias of item.guid.isPermaLink
|
|
* RSS::Maker: item.guid.permanent_link=
|
|
* new alias of item.guid.isPermaLink=
|
|
|
|
* JSON
|
|
* Update to JSON 1.1.9
|
|
|
|
* REXML
|
|
|
|
* REXML::Document.entity_expansion_limit=
|
|
|
|
New method to set the entity expansion limit. By default the limit is
|
|
set to 10000. See the following URL for details.
|
|
|
|
http://www.ruby-lang.org/en/news/2008/08/23/dos-vulnerability-in-rexml/
|
|
|
|
* logger
|
|
|
|
* imported upstream version (logger/1.2.7)
|
|
* do not raise an exception even if log writing failed.
|
|
* do not raise ShiftingError if an aged file already exists.
|
|
(no ShiftingError will be raised from 1.2.7, just warn() instead)
|
|
|
|
* open3
|
|
* new methods:
|
|
* Open3.popen2
|
|
* Open3.popen2e
|
|
* Open3.capture3
|
|
* Open3.capture2
|
|
* Open3.capture2e
|
|
* Open3.pipeline_rw
|
|
* Open3.pipeline_r
|
|
* Open3.pipeline_w
|
|
* Open3.pipeline_start
|
|
* Open3.pipeline
|
|
|
|
* pty
|
|
* new method:
|
|
* PTY.open
|
|
|
|
* openssl
|
|
* new methods:
|
|
* OpenSSL::Buffering#read_nonblock
|
|
* OpenSSL::Buffering#write_nonblock
|
|
* OpenSSL::SSL::SSLSocket#connect_nonblock
|
|
* OpenSSL::SSL::SSLSocket#accept_nonblock
|
|
|
|
* socket
|
|
|
|
* incompatible changes:
|
|
* Socket#{recvfrom,recvfrom_nonblock,accept,accept_nonblock,sysaccept}
|
|
returns a sender address as Addrinfo object instead of a binary sockaddr string.
|
|
Addrinfo#to_s returns the old binary sockaddr string.
|
|
* BasicSocket#getsockopt returns Socket::Option object instead of a binary string.
|
|
Socket::Option#to_s returns the old binary string.
|
|
|
|
* new class:
|
|
* Addrinfo
|
|
* Socket::Option
|
|
* Socket::AncillaryData
|
|
|
|
* new methods:
|
|
* Socket.ip_address_list
|
|
* Socket.tcp
|
|
* Socket.tcp_server_loop
|
|
* Socket.tcp_server_sockets
|
|
* Socket.udp_server_sockets
|
|
* Socket.udp_server_loop_on
|
|
* Socket.udp_server_loop
|
|
* Socket.unix
|
|
* Socket.unix_server_loop
|
|
* Socket.unix_server_socket
|
|
* Socket.accept_loop
|
|
* Socket#ipv6only!
|
|
* BasicSocket#local_address
|
|
* BasicSocket#remote_address
|
|
* BasicSocket#connect_address
|
|
* BasicSocket#sendmsg
|
|
* BasicSocket#sendmsg_nonblock
|
|
* BasicSocket#recvmsg
|
|
* BasicSocket#recvmsg_nonblock
|
|
* BasicSocket#getpeereid
|
|
|
|
* extended methods:
|
|
* Socket.new's 3rd argument is optional now.
|
|
* Socket.pair's 3rd argument is optional now.
|
|
* Socket.pair and UNIXSocket.pair can take a block.
|
|
* BasicSocket#send, UDPSocket#send, Socket.getnameinfo, Socket#bind, and
|
|
Socket#{connect,connect_nonblock} accepts an Addrinfo object as sockaddr.
|
|
* BasicSocket#getsockopt accepts a Socket::Option object.
|
|
|
|
* constant names can be accepted as well as constant values.
|
|
i.e. Socket.new(:PF_INET, :SOCK_STREAM, 0)
|
|
The constant names can be specified without the prefix.
|
|
i.e. Socket.new(:INET, :STREAM, 0)
|
|
* protocol/address family
|
|
* socket type
|
|
* socket option protocol level
|
|
* socket option name
|
|
* shutdown's argument
|
|
|
|
* pathname
|
|
* new methods:
|
|
* Pathname#binread
|
|
* Pathname#realdirpath
|
|
* Pathname#each_child
|
|
|
|
* probe
|
|
new library.
|
|
* Kernel#fire_probe
|
|
|
|
* Readline
|
|
* new methods:
|
|
* Readline.set_screen_size
|
|
* Readline.get_screen_size
|
|
|
|
* extended methods:
|
|
* Readline.completion_proc= accepts nil.
|
|
nil means to use default completion proc.
|
|
|
|
* time
|
|
* incompatible changes:
|
|
* Time.parse raises ArgumentError when no date information.
|
|
|
|
* thread
|
|
* extended method:
|
|
* ConditionVariable#wait takes timeout argument.
|
|
|
|
* securerandom
|
|
* new methods:
|
|
* SecureRandom.urlsafe_base64
|
|
|
|
* URI
|
|
* Obsoleted methods:
|
|
* URI#escape
|
|
* URI#unescape
|
|
|
|
* etc
|
|
* new methods:
|
|
* Etc::Passwd.each
|
|
* Etc::Group.each
|
|
|
|
* zlib
|
|
* new methods:
|
|
* Zlib::GzipFile#path
|
|
|
|
=== Language changes
|
|
|
|
* Regexp properties (\p{}) names now ignore underscores, spaces, and case, so
|
|
\p{ol chiki} is the same as \p{Ol_Chiki}
|
|
* Regexps now support Unicode 5.1 (new characters and scripts)
|
|
* \d, \s, and \w are now ASCII only; use POSIX bracket classes and \p{} for
|
|
Unicode semantics
|
|
* $: no longer includes the current directory, use require_relative
|
|
|
|
=== Tracing (experimental)
|
|
|
|
* Runtime tracing is supported. Currently implemented on top of dtrace.
|
|
You can trace a ruby program without any modification if your platform
|
|
supports dtrace USDT.
|
|
|
|
This feature is experimental. The semantics of probes will possibly change.
|
|
|
|
=== Compilation options
|
|
|
|
* --program-prefix and --program-suffix no longer act on the shared object
|
|
names nor paths to libraries.
|
|
|
|
use --with-rubylibprefix='${libruby}/${RUBY_INSTALL_NAME}' and
|
|
--with-soname='${RUBY_INSTALL_NAME}' for the same result as Ruby 1.9.1.
|
|
|
|
* --with-arch is added for universal binary, instead of
|
|
--enable-fat-binary option.
|
|
|
|
* --with-tracing-model is added for choosing a particular tracing mechanism.
|
|
|
|
=== Compatibility issues (excluding feature bug fixes)
|
|
|
|
* Enumerator#rewind
|
|
* Socket#recvfrom
|
|
* Socket#recvfrom_nonblock
|
|
* Socket#accept
|
|
* Socket#accept_nonblock
|
|
* Socket#sysaccept
|
|
* BasicSocket#getsockopt
|
|
* Time.utc
|
|
* Time.gm
|
|
* Time.local
|
|
* Time.mktime
|
|
* Time.parse
|
|
* --program-prefix and --program-suffix
|
|
* --enable-fat-binary
|
|
* $:
|
|
|
|
See above.
|