Skip to content

Instantly share code, notes, and snippets.

View dwaite's full-sized avatar
💭
Wondering what status is for

David Waite dwaite

💭
Wondering what status is for
View GitHub Profile
$ gem update --system
Updating RubyGems
Updating rubygems-update
Successfully installed rubygems-update-1.4.0
Updating RubyGems to 1.4.0
Installing RubyGems 1.4.0
/Users/david/.rvm/gems/ruby-1.9.2-p0/gems/rubygems-update-1.4.0/lib/rubygems/source_index.rb:62:in `installed_spec_directories': undefined method `path' for Gem:Module (NoMethodError)
from /Users/david/.rvm/gems/ruby-1.9.2-p0/gems/rubygems-update-1.4.0/lib/rubygems/source_index.rb:52:in `from_installed_gems'
from /Users/david/.rvm/gems/ruby-1.9.2-p0/gems/rubygems-update-1.4.0/lib/rubygems.rb:914:in `source_index'
from /Users/david/.rvm/gems/ruby-1.9.2-p0/gems/rubygems-update-1.4.0/lib/rubygems/gem_path_searcher.rb:98:in `init_gemspecs'
factorial := method(n,
if(n == 0, return 1)
res := 1
Range 1 to(n) foreach(i, res = res * i)
)
#!/bin/sh
cat $0
[2011-01-14 21:33:53] ant dist
Buildfile: /Users/david/.rvm/src/jruby-head/build.xml
init:
prepare-bin-jruby:
jar:
init:
it "handles a math expression" do
tokens = lexer.parse "1 + 2 * 3"
expected = [
Token.new(:Decimal, 1),
Token.new(:Identifier, "+"),
Token.new(:Decimal, 2),
Token.new(:Identifier, "*"),
Token.new(:Decimal, 3)
]
tokens.should == expected
cd lib && \
ERL_TOP=/private/tmp/homebrew-erlang-R14B01-8lkU PATH=/private/tmp/homebrew-erlang-R14B01-8lkU/bootstrap/bin:${PATH} \
make opt SECONDARY_BOOTSTRAP=true
=== Entering application hipe
(cd ../main && make hipe.hrl)
sed -e "s;%VSN%;3.7.8;" ../../hipe/main/hipe.hrl.src > ../../hipe/main/hipe.hrl
erlc -W +debug_info +inline -o../ebin hipe_rtl.erl
(no error logger present) error: "Error in process <0.1.0> with exit value: {{badfun,[<<5 bytes>>,<<50 bytes>>,<<9 bytes>>,<<3 bytes>>,<<2 bytes>>,<<5 bytes>>,<<12 bytes>>,<<2 bytes>>,<<8 bytes>>,<<8 bytes>>,<<5 bytes>>,<<7 bytes>>,<<5 bytes>>,<<11 bytes>>,<<2 bytes>>,<<11 bytes>>,<<15 bytes>>,<<4 bytes>>,<<53 bytes>>,<<5 bytes>>,<<1 byte>>,<<7 bytes>>,<<10 bytes>>,<<7 bytes>>,<<6 bytes>>,<<7 bytes>>,<<7 bytes>>,<<6 bytes>>,<<12 bytes>>]},[{erlang,apply,2}]}\n"
rvm install --trace --branch hydra rbx-hydra
--trace --branch hydra rbx-hydra
rvm 1.2.8 by Wayne E. Seguin ([email protected]) [http://rvm.beginrescueend.com/]
+ [[ -z '' ]]
+ export 'PS4=+[${BASH_SOURCE}] : ${LINENO} : ${FUNCNAME[0]:+${FUNCNAME[0]}() $ }'
+ PS4='+[${BASH_SOURCE}] : ${LINENO} : ${FUNCNAME[0]:+${FUNCNAME[0]}() $ }'
+[/Users/david/.rvm/scripts/cli] : 705 : __rvm_parse_args() $ [[ -z install ]]
+[/Users/david/.rvm/scripts/cli] : 707 : __rvm_parse_args() $ [[ 0 -eq 1 ]]
$ bundle exec rspec spec -fd
Callisto::Lexer
#tokenize
tokenizes a blank message to an empty array
tokenizes 'key' into a single identifier
tokenizes 'foo bar' into two identifiers
tokenizes hex numbers
tokenizes integers
tokenizes numbers starting with a decimal point
diff --git a/spec/ruby/language/regexp/back-references_spec.rb b/spec/ruby/langu
index c09a165..fe0d9e0 100644
--- a/spec/ruby/language/regexp/back-references_spec.rb
+++ b/spec/ruby/language/regexp/back-references_spec.rb
@@ -7,6 +7,13 @@ describe "Regexps with back-references" do
$~.to_a.should == ["ll"]
end
+ it 'allows the $~ pseudo-global varable to be assigned' do
+ "hello" =~ /l+/
rbx-head-hydra :002 > foo = /foo/.match "foo"
=> #<MatchData "foo">
rbx-head-hydra :003 > bar = /bar/.match "bar"
=> #<MatchData "bar">
rbx-head-hydra :004 > $~
=> #<MatchData "bar">
rbx-head-hydra :005 > $~ = foo
=> #<MatchData "foo">
rbx-head-hydra :006 > $~
=> #<MatchData "bar">