File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -520,7 +520,7 @@ static VALUE _rb_js_proc_to_js(VALUE obj) {
520520 * return {
521521 * method1: function(str, num) {
522522 * // str is a JavaScript string and num is a JavaScript number.
523- * str.length + num
523+ * return str.length + num
524524 * },
525525 * method2: function(rbObject) {
526526 * // Call String#upcase method for the given Ruby object (RbValue).
@@ -529,8 +529,8 @@ static VALUE _rb_js_proc_to_js(VALUE obj) {
529529 * }
530530 * JS
531531 * # Non JS::Object args are automatically converted to JS::Object by `to_js`.
532- * js_obj[:method1].call ("Hello", 5) # => 10
533- * js_obj[:method2].call (JS::Object.wrap("Hello, Ruby"))
532+ * js_obj.method1 ("Hello", 5) # => 10
533+ * js_obj.method2 (JS::Object.wrap("Hello, Ruby"))
534534 * # => "HELLO, RUBY" (JS::Object)
535535 */
536536
You can’t perform that action at this time.
0 commit comments