can't you use collect? and then join the result?

@myhash.each {|k,v| "<li>#{k} is #{v}</li>"}.join

On Wed, Feb 16, 2011 at 12:46 AM, Paul Bergstrom <[email protected]>wrote:

> Why does this output the same hash again (like hash.inspect) and not
> each key as I want?
>
> @myhash.each { |k,v| "<li>" + k + "</li>" }
>
> --
> Posted via http://www.ruby-forum.com/.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Talk" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/rubyonrails-talk?hl=en.
>
>


-- 
-------------------------------------------------------------
visit my blog at http://jimlabs.heroku.com

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to