DÅ?a Pondelok 20 Február 2006 04:09 Gregory B. napÃsal:
neither. irb was showing you the return value of your function call
effectively, p whatever
try:
puts(YAML::dump(m))
Meh. So gruesomely verbose Quoting yaml.rb:
#
# ryan:: You know how Kernel.p is a really convenient way to dump
ruby
# structures? The only downside is that it’s not as legible
as
# YAML.
#
# _why:: (listening)
#
# ryan:: I know you don’t want to urinate all over your users’
namespaces.
# But, on the other hand, convenience of dumping for
debugging is,
# IMO, a big YAML use case.
#
# _why:: Go nuts! Have a pony parade!
#
# ryan:: Either way, I certainly will have a pony parade.
#
(Definition of Kernel#y follows.)
Use:
y m
David V.
Having a pony parade
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.