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
# Hack to avoid "allocator undefined for Proc" issue when unpacking Gems: | |
# gemspec provided by Jeweler uses Rake::FileList for files, test_files and | |
# extra_rdoc_files, and procs cannot be marshalled. | |
# Jeweler Issue GH-73 | |
# Workaround by Alex Coles (myabc) | |
def gemspec | |
@clean_gemspec ||= eval("#{Rake.application.jeweler.gemspec.to_ruby}") # $SAFE = 3\n | |
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
#Builds scripts often use the GCC major and minor version | |
#to make tweaks and adjustments to compilation parameters | |
#by setting GCC_VERSION=41 for example. However, gcc doesn't | |
#provide an out of the box way to get at this value. | |
#this works until we get to GCC version 10 ;) | |
if /(\d)\.(\d)\.(\d)/ =~ `gcc --version` | |
puts "#{$1}#{$2}" #=> 44 | |
else | |
puts "unabled to find gcc version in #{`gcc --version`}" |
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
#include "v8.h" | |
#include "stdio.h" | |
int main (int argc, char const *argv[]) | |
{ | |
printf("In Context? %d\n", v8::Context::Context()); | |
return 0; | |
} |
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
/* | |
* Envjs core-env.1.2.0.0 | |
* Pure JavaScript Browser Environment | |
* By John Resig <http://ejohn.org/> and the Envjs Team | |
* Copyright 2008-2010 John Resig, under the MIT License | |
*/ | |
var Envjs = function(){ | |
var i, | |
name |
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
legolas:purely_functional_data_structures cowboyd$ rake cucumber | |
(in /Users/cowboyd/Projects/purely_functional_data_structures) | |
/opt/local/bin/ruby -I "/Users/cowboyd/Projects/cucumber/lib:lib" "/Users/cowboyd/Projects/cucumber/bin/cucumber" | |
Using the default profile... | |
Feature: Adding Lists | |
Scenario: adding to an empty list yields second list # features/adding_lists.feature:3 | |
Given an empty list "list1" # | |
And an empty list "list2" # | |
When I cons "2" to "list2" # |
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 'v8/jasmine' | |
require 'time' | |
require 'erb' | |
module JasmineMate | |
def self.start | |
start = Time.now | |
begin | |
cxt = V8::Jasmine::Context.new | |
env = cxt['jasmine'].getEnv() | |
env.addReporter(Reporter.new) |
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 'v8' | |
cxt = V8::Context.new | |
cxt.load('env.js') | |
cxt['document'].tap do |document| | |
puts document | |
document.createElement('div').tap do |div| | |
puts div | |
div.setAttribute("id", "foo") |
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
/* | |
* Envjs core-env.1.2.13 | |
* Pure JavaScript Browser Environment | |
* By John Resig <http://ejohn.org/> and the Envjs Team | |
* Copyright 2008-2010 John Resig, under the MIT License | |
*/ | |
var Envjs = function(){ | |
var i, | |
name, |
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
#!/usr/bin/env sh | |
if [ -s "/Users/cowboyd/.rvm/environments/ruby-1.8.7-p174" ] ; then | |
. "/Users/cowboyd/.rvm/environments/ruby-1.8.7-p174" | |
exec ruby "$@" | |
else printf "ERROR: Missing RVM environment file: | |
'/Users/cowboyd/.rvm/environments/ruby-1.8.7-p174' | |
" ; exit 1fi |
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-1.8.7-p174 > WeakRef | |
NameError: uninitialized constant WeakRef | |
from (irb):1 | |
ruby-1.8.7-p174 > require 'weakref' | |
=> true | |
ruby-1.8.7-p174 > WeakRef | |
=> WeakRef | |
ruby-1.8.7-p174 > |
OlderNewer