Created
September 9, 2011 18:58
-
-
Save acook/1207038 to your computer and use it in GitHub Desktop.
Pry session, show-doc string
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
pry(main)> x = "" | |
=> "" | |
pry(main)> cd x | |
pry(""):1> show-doc chars | |
From: string.c in Ruby Core (C Method): | |
Number of lines: 11 | |
visibility: public | |
signature: chars() | |
str.each_char {|cstr| block } -> str | |
str.each_char -> an_enumerator | |
Passes each character in str to the given block, or returns | |
an enumerator if no block is given. | |
"hello".each_char {|c| print c, ' ' } | |
produces: | |
h e l l o |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment