Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Ruby
each method
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
Reply to thread
Message
[QUOTE="Brian Candler, post: 4667736"] Another option, if you know the contents are all Strings or Arrays, is to use replace: a.each { |x| x.replace(x+"!") } It's different because it modifies the string objects themselves (leaving the Array pointing to the same string objects) [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Ruby
each method
Top