Skip to content

Instantly share code, notes, and snippets.

@jschementi
Created July 23, 2009 09:03
Show Gist options
  • Save jschementi/152568 to your computer and use it in GitHub Desktop.
Save jschementi/152568 to your computer and use it in GitHub Desktop.
#rupert@linux:~/Desktop/oscon09/ironruby/Merlin/Main/Bin/Release> ir
#IronRuby 0.6.0.0 on Mono 2.4.2.1
#Copyright (c) Microsoft Corporation. All rights reserved.
#
puts 2 + 2
#4
#=> nil
(1..10).inject{|sum, i| sum += i}
#=> 55
System::Environment.OSVersion
#=> Unix 2.6.27.23
System::Collections::Generic.constants
#=> ["Comparer", "Dictionary", "EqualityComparer", "ICollection", "IComparer", "IDictionary", "IEnumerable", "IEnumerator", "IEqualityComparer", "IList", "KeyNotFoundException", "KeyValuePair", "LinkedList", "LinkedListNode", "List", "Queue", "SortedDictionary", "SortedList", "Stack"]
l = System::Collections::Generic::List[Fixnum].new
#=> []
l << 1
#=> [1]
l << 'err'
#mscorlib:0:in `System.Collections.IList.Add': item (ArgumentError)
# from :0:in `<<'
# from :0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment