This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
eval_cmd = <<EOF | |
$SAFE=4 | |
#{$common_code} | |
#$stdout = Sandbox.new() | |
#{previous_commands} | |
$stdout = $original_stdout | |
#{line} | |
EOF | |
#puts eval_cmd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Symbol | |
def to_proc | |
Proc.new { |obj, *args| obj.send(self, *args) } | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ ruby test.rb | |
Loaded suite NestingLevelTest | |
Started | |
........ | |
Finished in 0.012890806 seconds. | |
8 tests, 9 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications | |
Loaded suite TryRubyOutputTest | |
Started |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*! | |
* jQuery JavaScript Library v1.6.4 | |
* http://jquery.com/ | |
* | |
* Copyright 2011, John Resig | |
* Dual licensed under the MIT or GPL Version 2 licenses. | |
* http://jquery.org/license | |
* | |
* Includes Sizzle.js | |
* http://sizzlejs.com/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'spec_helper' | |
describe "carts/show" do | |
# using before(:all) rather than before(:each) causes the error: | |
# NoMethodError: undefined method `example_group' for nil:NilClass | |
# ~/.rvm/gems/ruby-1.9.3-p125/gems/rspec-rails-2.12.0/lib/rspec/rails/example/view_example_group.rb:106:in `_default_file_to_render' | |
# ~/.rvm/gems/ruby-1.9.3-p125/gems/rspec-rails-2.12.0/lib/rspec/rails/example/view_example_group.rb:112:in `_default_render_options' | |
# ~/.rvm/gems/ruby-1.9.3-p125/gems/rspec-rails-2.12.0/lib/rspec/rails/example/view_example_group.rb:45:in `render' | |
# show.html.erb_spec.rb:10:in `block (2 levels) in <top (required)>' | |
before(:each) do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// CodeMirror, copyright (c) by Marijn Haverbeke and others | |
// Distributed under an MIT license: http://codemirror.net/LICENSE | |
/** | |
* Supported keybindings: | |
* | |
* Motion: | |
* h, j, k, l | |
* gj, gk | |
* e, E, w, W, b, B, ge, gE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Pry::Commands.create_command "ll" do | |
description "Loads a file. If no arg is passed, will reload the last file" | |
def process | |
if (args.length == 0) | |
if $PRY_MY_LAST_LL.nil? | |
output.puts "No last file, aborting" | |
else | |
load $PRY_MY_LAST_LL |