<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -631,10 +631,12 @@ rb_smjs_ruby_proc_caller2(VALUE args){
 	return rb_apply(obj, mname, args);
 }
 
+#ifdef ZERO_ARITY_METHOD_IS_PROPERTY
 struct {
 	char* keyname;
 	jsval val;
 }g_last0arity;
+#endif
 
 static JSBool
 rbsm_class_no_such_method( JSContext* cx, JSObject* thisobj, uintN argc, jsval* argv, jsval* rval){
@@ -648,11 +650,13 @@ rbsm_class_no_such_method( JSContext* cx, JSObject* thisobj, uintN argc, jsval*
 		JS_ReportErrorNumber(cx, rbsm_GetErrorMessage, NULL, RBSMMSG_NOT_FUNCTION, keyname);
 		return JS_FALSE;
 	}
+#ifdef ZERO_ARITY_METHOD_IS_PROPERTY
 	if( strcmp( keyname, g_last0arity.keyname )==0 ){
 	//printf(&quot;!\n&quot;);
 		*rval = g_last0arity.val;
 		return JS_TRUE;
 	}
+#endif
 	//printf(&quot;!=%s]&quot;,g_last0arity.keyname);
 	return JS_FALSE;
 /*
@@ -743,6 +747,7 @@ rbsm_get_ruby_property(JSContext* cx, JSObject* obj, jsval id, jsval* vp, VALUE
 		}
 	}else if (rb_funcall( rbobj, rb_intern(&quot;respond_to?&quot;), 1, ID2SYM(rid))) {
 		method = rb_funcall( rbobj, rb_intern(&quot;method&quot;), 1, ID2SYM(rid) );
+#ifdef ZERO_ARITY_METHOD_IS_PROPERTY
 		// &#12513;&#12477;&#12483;&#12489;&#12398;&#24341;&#25968;&#12398;&#25968;&#12434;&#35519;&#12409;&#12427; 
 		iarity = NUM2INT(rb_funcall( method, rb_intern(&quot;arity&quot;), 0 ));
 		if( iarity == 0 /*|| iarity==-1*/ ){
@@ -755,6 +760,9 @@ rbsm_get_ruby_property(JSContext* cx, JSObject* obj, jsval id, jsval* vp, VALUE
 			// &#24341;&#25968;0&#20197;&#19978;&#12289;&#12354;&#12427;&#12356;&#12399;&#21487;&#22793;&#24341;&#25968;&#12398;&#12513;&#12477;&#12483;&#12489;&#12399;function&#12458;&#12502;&#12472;&#12455;&#12463;&#12488;&#12395;&#12375;&#12390;&#36820;&#12377; 
 			*vp = OBJECT_TO_JSVAL(rbsm_proc_to_function(cx,method));
 		}
+#else
+			*vp = OBJECT_TO_JSVAL(rbsm_proc_to_function(cx,method));
+#endif
 	}
 	return JS_TRUE;
 }</diff>
      <filename>spidermonkey.c</filename>
    </modified>
    <modified>
      <diff>@@ -241,7 +241,7 @@ class SpiderMonkeyTest &lt; Test::Unit::TestCase
 			cx.eval(&quot; try{ x.func1(); }catch(e){} &quot;)
 		}
 		assert_equal &quot;test&quot;, cx.eval(&quot; try{ x.func1(); }catch(e){e.toString()} &quot;)
-		assert_equal TESTException, cx.eval(&quot; y=null; try{ x.func1(); }catch(e){ y=e['class']; } y&quot;)
+		assert_equal TESTException, cx.eval(&quot; y=null; try{ x.func1(); }catch(e){ y=e['class'](); } y&quot;)
 		
 	end
 
@@ -262,7 +262,7 @@ class SpiderMonkeyTest &lt; Test::Unit::TestCase
 		hoge = Hoge.new
 		cx = SpiderMonkey::Context.new
 		cx.set_property( &quot;hoge&quot;, hoge );
-		assert_equal 1, cx.evaluate( %! hoge.para ! ) , &quot;no need arguments method is property&quot;
+		assert_equal 1, cx.evaluate( %! hoge.para() ! ) , &quot;no need arguments method is property&quot;
 		assert_equal 2, cx.evaluate( %! hoge.add1( 1 ) ! );
 		
 		cx.set_property( &quot;Time&quot;, Time );
@@ -273,12 +273,12 @@ class SpiderMonkeyTest &lt; Test::Unit::TestCase
 		assert_equal Math::PI ,cx.eval(&quot;RubyMath.PI&quot;) 
 
 		assert_equal &quot;object&quot;, cx.evaluate( %! typeof hoge ! );
-		begin
-			assert_equal 1, cx.eval(&quot;hoge.para()&quot;)
-			flunk &quot;para is not function&quot;
-		rescue SpiderMonkey::EvalError =&gt; e
-			assert_match /TypeError/, e.message
-		end
+		#begin
+		#	assert_equal 1, cx.eval(&quot;hoge.para()&quot;)
+		#	flunk &quot;para is not function&quot;
+		#rescue SpiderMonkey::EvalError =&gt; e
+		#	assert_match /TypeError/, e.message
+		#end
 	end
 	
 	class Hoge2
@@ -291,7 +291,7 @@ class SpiderMonkeyTest &lt; Test::Unit::TestCase
 		hoge = Hoge2.new
 		cx = SpiderMonkey::Context.new
 		cx.set_property( &quot;hoge&quot;, hoge );
-		assert_equal 1, cx.eval(&quot;hoge.para &quot;)
+		#assert_equal 1, cx.eval(&quot;hoge.para &quot;)
 		assert_equal 1, cx.eval(&quot;hoge.para();&quot;)
 	end
 
@@ -302,7 +302,7 @@ class SpiderMonkeyTest &lt; Test::Unit::TestCase
 		x.name=&quot;hoge&quot;
 		assert_equal 'hoge', x.name
 		cx.set_property( &quot;x&quot;, x );
-		assert_equal &quot;hoge&quot;, cx.eval(&quot;x.name&quot;)
+		assert_equal &quot;hoge&quot;, cx.eval(&quot;x.name()&quot;)
 		assert_equal 'fuga', cx.eval(&quot;x.name='fuga'&quot;)
 		assert_equal 'fuga', x.name
 		assert_equal &quot;undefined&quot;, cx.evalget(&quot;x.name2&quot;).typeof</diff>
      <filename>test.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>1a9efaf21d5d2a79d95400306b1148d0b2002158</id>
    </parent>
  </parents>
  <author>
    <name>nazoking</name>
    <email>nazoking@368abcae-401b-0410-88d4-195e74ebbf5f</email>
  </author>
  <url>http://github.com/matthewd/ruby-mozjs/commit/84ef1b2d9da23980df174caf1f8b239b560f8f38</url>
  <id>84ef1b2d9da23980df174caf1f8b239b560f8f38</id>
  <committed-date>2006-12-10T03:58:54-08:00</committed-date>
  <authored-date>2006-12-10T03:58:54-08:00</authored-date>
  <message>Ruby&#12458;&#12502;&#12472;&#12455;&#12463;&#12488;&#12398;&#24341;&#25968;&#12394;&#12375;&#12513;&#12477;&#12483;&#12489;&#12434;JavaScript&#12363;&#12425;&#12503;&#12525;&#12497;&#12486;&#12451;&#12540;&#12392;&#12375;&#12390;&#12399;&#21628;&#12409;&#12394;&#12367;&#12375;&#12383;&#12290;


git-svn-id: http://ruby-spidermonkey.googlecode.com/svn/trunk@5 368abcae-401b-0410-88d4-195e74ebbf5f</message>
  <tree>bc1d47bac18a78c0fa33ebb8ceb91ebc4924e0fa</tree>
  <committer>
    <name>nazoking</name>
    <email>nazoking@368abcae-401b-0410-88d4-195e74ebbf5f</email>
  </committer>
</commit>
