JRuby1.6.7发布

JRuby 1.6.7 更新版本发布了,该版修复了Ruby 1.9 的一些兼容性问题,在性能方面也有不少改善,值得关注的变化有:

创新互联公司是一家以成都网站建设、网页设计、品牌设计、软件运维、成都网站营销、小程序App开发等移动开发为一体互联网公司。已累计为成都纸箱等众行业中小客户提供优质的互联网建站和软件开发服务。

  • Fix circular require issue in Rubygems introduced by our Maven gem support
  • Fix regression in popen* where streams get prematurely closed
  • Many 1.9-mode encoding bugs fixed in String, Regexp, StringIO, and YAML
  • Win32OLE now works in 1.9-mode
  • ffi on Win x64 now knows about basic types :size_t
  • Use jzlib to fix a set of issues with out zlib library
  • Reduced internal locking based on user reports
  • C extensions work on OS X again
  • Gems with gemspecs which contain UTF-8 multi-byte chars install in 1.9 mode

完整的列表请看:full list of resolved issues

JRuby是面向Ruby、基于Java虚拟机(JVM)的一种解释程序,它结合了Ruby语言的简易性和功能强大的JVM的执行机制,包括与Java库 全面集成。Rails彻底加快及简化了Web应用的开发,不过它让人觉得不够成熟,特别是在高端企业级功能方面。另一方面,Java平台及其虚拟机、库和 应用服务器的速度、稳定性和功能方面却一直在提升,现在已被公认为是开发高端服务器应用的领先平台。不过如果Java平台不与Ruby等新兴语言联系在一 起,就有可能落后于流行趋势。

示例代码:

 
 
 
 
  1. require "java" 
  2.     
  3.   include_class "java.util.TreeSet" 
  4.   include_class "com.example.CallMe" 
  5.   include_class "com.example.ISpeaker" 
  6.     
  7.   puts "Hello from ruby" 
  8.   set = TreeSet.new  
  9.   set.add "foo" 
  10.  
  11.   set.add "Bar" 
  12.   set.add "baz" 
  13.   set.each { |v| puts "value: #{v}" }  
  14.     
  15.   cm = CallMe.new  
  16.   cm.hello  
  17.   $globalCM.hello  
  18.     
  19.   class CallJava  
  20.     include ISpeaker  
  21.     def initialize  
  22.       super  
  23.       @count = 0 
  24.     end  
  25.     
  26.     def say(msg)  
  27.       puts "Ruby saying #{msg}" 
  28.     end  
  29.       
  30.     def addOne(from)  
  31.   #    m.synchronize {  
  32.         @count += 1 
  33.         puts "Now got #@count from #{from}" 
  34.  
  35.   #    }  
  36.     end  
  37.   end 

下载地址:http://jruby.org/download

新闻名称:JRuby1.6.7发布
网站URL:http://www.csdahua.cn/qtweb/news17/50717.html

网站建设、网络推广公司-快上网,是专注品牌与效果的网站制作,网络营销seo公司;服务项目有等

广告

声明:本网站发布的内容(图片、视频和文字)以用户投稿、用户转载内容为主,如果涉及侵权请尽快告知,我们将会在第一时间删除。文章观点不代表本网站立场,如需处理请联系客服。电话:028-86922220;邮箱:631063699@qq.com。内容未经允许不得转载,或转载时需注明来源: 快上网