diff --git a/spec/jasmine/console_log/console_log.yml b/spec/jasmine/console_log/console_log.yml
index 7a2453e..0ceafe5 100644
--- a/spec/jasmine/console_log/console_log.yml
+++ b/spec/jasmine/console_log/console_log.yml
@@ -1,5 +1,5 @@
-
src_files:
+ - spec/javascripts/support/jquery-1.6.2.min.js
- spec/jasmine/console_log/console_log.js
spec_files:
diff --git a/spec/jasmine/console_log/console_log_spec.js b/spec/jasmine/console_log/console_log_spec.js
index 471396c..b31345b 100644
--- a/spec/jasmine/console_log/console_log_spec.js
+++ b/spec/jasmine/console_log/console_log_spec.js
@@ -3,5 +3,12 @@ describe('console.log', function() {
console.log("hello");
expect(success).toEqual(1);
});
+
+ it("wont eat my precious jqueries", function() {
+ var d = $('
');
+ expect(d.find('#inner').length).toBe(1);
+ console.log(d.find('#inner'));
+ expect(d.find('#inner').length).toBe(1);
+ });
});
diff --git a/vendor/assets/coffeescripts/prolog.coffee b/vendor/assets/coffeescripts/prolog.coffee
index 75479c9..09fbcf7 100644
--- a/vendor/assets/coffeescripts/prolog.coffee
+++ b/vendor/assets/coffeescripts/prolog.coffee
@@ -2,7 +2,7 @@ if window.JHW
window.console =
log: (data) ->
if typeof(jQuery) != 'undefined' && data instanceof jQuery
- JHW.log(style_html($("").append(data).html(), { indent_size: 2 }))
+ JHW.log(style_html($("").append(data.clone()).html(), { indent_size: 2 }))
else
useJsDump = true
diff --git a/vendor/assets/javascripts/prolog.js b/vendor/assets/javascripts/prolog.js
index 2fd358b..8fe9b77 100644
--- a/vendor/assets/javascripts/prolog.js
+++ b/vendor/assets/javascripts/prolog.js
@@ -5,7 +5,7 @@
log: function(data) {
var dump, useJsDump;
if (typeof jQuery !== 'undefined' && data instanceof jQuery) {
- return JHW.log(style_html($("").append(data).html(), {
+ return JHW.log(style_html($("").append(data.clone()).html(), {
indent_size: 2
}));
} else {