Changes in Ruby 1.8.5
Non-blocking IO
Several methods backported from HEAD have been added:
- BasicSocket#recv_nonblock
- IO#read_nonblock
- IO#write_nonblock
- Socket#accept_nonblock
- Socket#connect_nonblock
- Socket#recvfrom_nonblock
- TCPServer#accept_nonblock
- UDPSocket#recvfrom_nonblock
- UNIXServer#accept_nonblock
(see ruby-core:7917, ruby-core:7925).
Process.getrlimit/setrlimit
See ruby-dev:28729.
Changes in rdoc/ri
- lots of documentation added
- RubyGems support: ri will search gem installation dirs for additional documentation
- new options to limit the search path
RSS
- added RSS::RootElementMixin#to_xml (ruby-talk:197284), which can be used to convert feeds to a different RSS version as follows:
rss10 = RSS::Parser.parse(File.read("1.0.rdf"))
File.open("2.0.rss", "w") {|f| f.print(rss10.to_xml("2.0"))}
- Support for taxonomies added to the RSS parser and generator.
- A number of convenience methods added
- (fillme)
New style API for RSS generation ruby-talk:197284
The recommended style is now
xxx.new_yyy do |yyy| yyy.zzz = zzz ... end
This corresponds to the following in pre-1.8.5:
yyy = xxx.new_yyy
yyy.zzz = zzz
Misc
- added Kernel#Pathname(path) (require 'pathname')
- added Kernel#pretty_inspect (require 'pp')
- changes in the GC subsystem that result in better performance in some cases
- added OptionParser#getopts
- the per-object overhead went down to 20 bytes on win32 (from 24) ruby-core:7474
What breaks (!!!)
- Binding.of_caller, and therefore breakpoint (including Rails')*1
- several problems in ri reported: the documentation for some methods seems to have disappeared, and several methods that should not be documented appear in the indices; see ruby-core:08709
References
- Ruby's ChangeLog
- Japanese changelog: http://www.ruby-lang.org/ja/man/?cmd=view;name=ruby+1.8.5+feature
*1 mfp: take a look at call_stack for a workaround
Keyword(s):[ruby] [1.8.5] [changelog]
References:[Ruby 1.8.5 released. What's new?]