class PT
private
def private_method
puts "private method executed!"
end
end
p = PT.new
begin
p.private_method
rescue NoMethodError
puts "call Private method error!"
end
PT.new.method(:private_method).call
最后执行结果如下:
>ruby C:/magic.rb
call Private method error!
private method executed!
重新设计了版面结构,可以看看这里:
http://new.ruby-lang.org/en
http://new.ruby-lang.org/ja
以dot net的ML为基础,性能相当于C#,是一个集脚本,函数式,面向对象等于一身的语言。
它的主页在:http://research.microsoft.com/fsharp/fsharp.aspx
Summary
There’s a whole world of language features that we sometimes miss out on as Rubyists, such as pattern matching, S-expressions, and external domain-specific languages. But the good news is that we can have them, too, as long as we’re not afraid to steal a few things first.
原文:http://www.artima.com/rubycs/articles/patterns_sexp_dsls.html
这是一个用来建造GUI和代码生成的工具,当然是用于FOXRuby的了。
主页在http://fox-tool.rubyforge.org
这是一个适用于VS2005的add-in。可以在VS2005里编写、运行Ruby程序。
那么它的特点呢,就是非常类似c#等dotnet的编辑器,代码能折叠,能检查语法错误,
支持Rails工程,中括号自动匹配,能debug等,看图片非常好。
不过,它目前只支持VS2005标准版或更高版本,不支持2005Exprese或者2003
我的机器是2003,所以没有试装。
Steel本身也分两个版本:标准版和专业版。专业版将会一直免费。
很多图片可以看这里:http://www.sapphiresteel.com/static/pages/software/steel_features.html
项目主页在:http://www.sapphiresteel.com/
今天早上5点就醒了,也没再睡着,6点起来,7点到公司。
想想快到世界杯了,到时候应该睡眠可能会更少些吧。
6月4号北航科技园足球联赛开始,大概有5个周末吧。
应该可以好好享受一下了。
本来说6月末就要开始公司内部联赛了,现在内部联赛只好推迟了。
原来以为JRuby的开发可能停滞不前了,但好象目前还挺积极的。
JSR223是为了让Java和脚本语言能交互。BSF的全称是Bean Scripting Framework ,它是一些能在Java应用中执行脚本语言的类。脚本语言也可以访问Java的类和方法等。
由于google经常被封,当google上不去了怎么办?可以试试这个:
http://www.notii.com
就可以连到google上了。