Skip to content

Instantly share code, notes, and snippets.

@arturaz
Created May 7, 2012 17:35
Show Gist options
  • Save arturaz/2629179 to your computer and use it in GitHub Desktop.
Save arturaz/2629179 to your computer and use it in GitHub Desktop.
def iterator = {
val rubyIter = raw.directEntrySet().iterator()
new Iterator[(IRubyObject, IRubyObject)] {
def hasNext = rubyIter.hasNext
def next() = {
val key = rubyIter.next.asInstanceOf[IRubyObject]
val value = raw.fastARef(key)
(key, value)
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment