diff --git a/History.txt b/History.txt index b4cecf2..9383922 100644 --- a/History.txt +++ b/History.txt @@ -1,5 +1,11 @@ -=== 1.72.3 2009 11-11 -* 1 major enhancement +=== 1.72.4 2009-11-12 +* 3 major enhancements: + * automatically wrap/unwrap ruby and javascript arrays + * automatically convert ruby method objects and Proc objects into javascript functions + * Make functions defined in javascript callable from ruby + +=== 1.72.3 2009-11-11 +* 4 major enhancements: * greatly simplified interface to context by unifying context and scope * remove Context#open_std() * remove Context#standard diff --git a/README.rdoc b/README.rdoc index 3fee32f..2169470 100644 --- a/README.rdoc +++ b/README.rdoc @@ -26,7 +26,7 @@ Embed the Mozilla Rhino Javascript interpreter into Ruby # evaluate a ruby function from javascript Rhino::Context.open do |context| - context["say"] = function {|word, times| word * times} + context["say"] = lambda {|word, times| word * times} context.eval("say("Hello", 3)") #=> HelloHelloHello end diff --git a/lib/rhino.rb b/lib/rhino.rb index 0f32926..3f23c7f 100644 --- a/lib/rhino.rb +++ b/lib/rhino.rb @@ -3,7 +3,7 @@ $:.unshift(File.dirname(__FILE__)) unless module Rhino - VERSION = '1.72.3' + VERSION = '1.72.4' require 'rhino/java' require 'rhino/context' require 'rhino/wormhole' diff --git a/spec/rhino/context_spec.rb b/spec/rhino/context_spec.rb index a03e967..c78599c 100644 --- a/spec/rhino/context_spec.rb +++ b/spec/rhino/context_spec.rb @@ -66,7 +66,7 @@ describe Rhino::Context do it "can call ruby functions from javascript" do Context.open do |cxt| - cxt["say"] = function {|word, times| word * times} + cxt["say"] = lambda {|word, times| word * times} cxt.eval("say('Hello',2)").should == "HelloHello" end end