Skip to content

Instantly share code, notes, and snippets.

require 'rubygems'
require 'eventmachine'
module Console
PROMPT = "\n>> ".freeze
def post_init
send_data PROMPT
send_data "\0"
end
diff --git a/shell/js.cpp b/shell/js.cpp
index 0750356..f1ac08f 100644
--- a/shell/js.cpp
+++ b/shell/js.cpp
@@ -2579,9 +2579,23 @@ split_addProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
return JS_TRUE;
if (!cpx->isInner && cpx->inner) {
/* Make sure to define this property on the inner object. */
- if (!JS_ValueToId(cx, *vp, &asId))
- return JS_FALSE;
called = undefined;
__defineGetter__("foo",function(){return"bar";});
__defineSetter__("bar",function(bif){called = bif;});
try{
if(foo!=="bar"){
print("should equal bar");
}
} catch(e) {
print("should not have raised "+e);
}
#0 0x00007fbd2c409665 in raise () from /lib/libc.so.6
#1 0x00007fbd2c40ac41 in abort () from /lib/libc.so.6
#2 0x00007fbd25fd230c in JS_Assert (s=0x7fbd2601b637 "JSVAL_IS_STRING(v)", file=0x7fbd2601b608 "jsapi.h", ln=197) at jsutil.cpp:69
#3 0x00007fbd25f45f19 in JSVAL_TO_STRING (v=8601715238090597217) at jsapi.h:197
#4 0x00007fbd25f48cfe in InitExnPrivate (cx=0x218d0d0, exnObject=0x28dd2c0, message=0x28ad790, filename=0x28ad7a0, lineno=303, report=0x7fff1171b670) at jsexn.cpp:328
#5 0x00007fbd25f49176 in js_ErrorToException (cx=0x218d0d0, message=0x139ab70 "#<ArgumentError: wrong number of arguments (1 for 0)>", reportp=0x7fff1171b670) at jsexn.cpp:1194
#6 0x00007fbd25f1cba5 in ReportError (cx=0x218d0d0, message=0x139ab70 "#<ArgumentError: wrong number of arguments (1 for 0)>", reportp=0x7fff1171b670) at jscntxt.cpp:1294
#7 0x00007fbd25f1cee4 in js_ReportErrorVA (cx=0x218d0d0, flags=0, format=0x28e1060 "#<ArgumentError: wrong number of arguments (1 for 0)>", ap=0x7fff1171b710) at jscntxt.cpp:1423
#8
diff --git a/lib/capybara/driver/base.rb b/lib/capybara/driver/base.rb
index 6cf8c00..effb1bd 100644
--- a/lib/capybara/driver/base.rb
+++ b/lib/capybara/driver/base.rb
@@ -19,6 +19,9 @@ class Capybara::Driver::Base
false
end
+ def wait_until *args
+ end
<html>
<head>
</head>
<body>
<script type="text/javascript" src="http://www.json.org/json2.js"></script>
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
<script type="text/javascript">
var geocoder;
Program received signal EXC_ARITHMETIC, Arithmetic exception.
0x00000001006d5131 in gc_root_traversal ()
(gdb) bt
#0 0x00000001006d5131 in gc_root_traversal ()
#1 0x00000001006b071d in JS_DHashTableEnumerate ()
#2 0x00000001006d3a34 in js_TraceRuntime ()
#3 0x00000001006d3cad in js_GC ()
#4 0x00000001006a54c1 in js_DestroyContext ()
#5 0x000000010068e494 in deallocate (runtime=0x101a188e0) at ../../../../ext/tracemonkey/runtime.cc:481
#6 0x00000001000379ad in run_final (obj=4313150280) at gc.c:1955
Using the default profile...
-----F
(::) failed steps (::)
scope '//*[@id = 'messages']//*[contains(concat(' ', @class, ' '), ' message ') and position() = 2]' not found on page (Capybara::ElementNotFound)
./features/step_definitions/posts_steps.rb:20
./features/step_definitions/posts_steps.rb:18:in `each'
./features/step_definitions/posts_steps.rb:18:in `/^I fill in messages with "([^\"]*)"$/'
features/manage_posts.feature:15:in `And I fill in messages with "<messages>"'
XXXXXXXXXXXXXXXX XXXXXXXXX XX XX XXXXX XXXX XX XXXXXXXXX XX XX
XXXXXXXXXXXXXXXX XXXXXXXXX XXX XX XXXXX XXXXX XX XXXXXXXXX XX XXX
XXXXXXXXXXXXXXXX XXXXXXXX XXX XX XXXX XXXXXXXXXXXXXXXXXX XXX XXX XX XXXX
XXX XXX XXX XX XXX XXX XXXXXXXXX XX XX XX XX
XXX XXX XX XX XXX XX XXXXXXXXX XXX XX XX XX
XXX XXXXXXX XXX XX XXXXXXX XXXXXXXXX XXXXX XX XXX XXX XX XX XXXX
XXX XXXXXXX XXX XX XXXXXXX XXXXXXXXX XXXXX XX XXX XXX XX XX XXXX
XXX XXXXXXX XXX XXXXXXX XXXX XXX XXX XXXXXXX XXX XXXXXX XXXX XXX
XXX XXXXXXX XXX XXXXXXX XXXX XXX XXX XXXXXXX XX XXXXXX XXXX XXX
XXX XXXXXXX XXX XXXXXXXXX XXX XX XXXXXXXXX XXXXXXX XX XXXXXXXXXXX
#!/usr/bin/env macruby
framework 'AppKit'
framework 'QTKit'
framework 'QuartzCore'
framework 'CoreVideo'
class AppDelegate
def applicationDidFinishLaunching(notification)
@window = NSWindow.alloc.initWithContentRect([200, 300, 640, 480],