Created
June 3, 2009 21:58
-
-
Save methodmissing/123275 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| VALUE | |
| rb_hash_aref(hash, key) | |
| VALUE hash, key; | |
| { | |
| VALUE val; | |
| if (!st_lookup(RHASH(hash)->tbl, key, &val)) { | |
| return rb_funcall(hash, id_default, 1, key); | |
| } | |
| return val; | |
| } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment