InfoQ was "unlaunched" last week, (meaning we''re still doing some final bug-fixing), but you should still check it out and see all the good stuff we have so far. Exclusive video interviews with DHH, David Black and other well-known Rubyists, as well as presentations such as Charles and Tom demo''ing JRuby at JavaOne last week are coming soon. I''m serving as the Ruby community editor, so contact me via email if you''re interested in contributing news or articles. BTW, the founder of InfoQ.com, Floyd Marinescu, is famous for starting theserverside.com, one of the world''s most popular technical websites. He''s a big fan of Ruby and Rails and we''re proud of working together to be the first site to give Ruby top-billing along with Java, .NET and other topics such as Agile and SOA. For your convenience, here is a list of all content and news on InfoQ<http://www.infoq.com/>about Ruby to date... Agile Asset Management with Ruby DSLs<http://www.infoq.com/articles/Agile-Asset-Management> Ruby makes it easy to craft Domain-Specific-Languages with Ruby syntax. This article is a story about the benefits derived from implementing a Ruby DSL for a PLANET ARGON development project. Ruby and Rails: In your face... but out of your way<http://www.infoq.com/articles/Ruby-and-Rails-In-your-face> Ruby on Rails is in many ways a system in itself. But in many, many other ways, Rails exposes, explores, and exploits its connections to Ruby, rather than hiding or disguising them. David A. Black, author of the book Ruby for Rails from Manning, shares his thoughts on whether or not Rails developers should take the time to master Ruby. News about Ruby Ruby Coverage Tool Making Rapid Progress<http://www.infoq.com/news/Ruby-Coverage-Tool-Progress> Earlier this week, Mauricio Fernandez released version 0.4 of Rcov, his tool for simple code coverage analysis in Ruby. Rcov is fast, feature-packed and progressing rapidly. New Rails Powered Sites Announced<http://www.infoq.com/news/New-Rails-Powered-Sites-Announce> A couple of shiny new Rails-powered websites were announced in the last couple of days. Invitika is described as SMS + mobile blogging + event planning + LBS + photos. Thebeststuffintheworld.com is a comprehensive database of, well, the best stuff in the world, just as implied by the name. RailsDay 2006 Announced <http://www.infoq.com/news/RailsDay-2006-Announced> RailsDay 2006 is a 24 hour competition scheduled to be held in mid-June, right before RailsConf. During the contest, teams of Ruby on Rails developers from around the world will compete for valuable prizes to see who can author the best Rails application in just a day. Interview with Mongrel Author Zed Shaw<http://www.infoq.com/news/Interview-with-Mongrel-Author-Ze> Well-known Rails programmer Zed Shaw was interviewed by O''Reilly. Zed talked about Ruby on Rails and his work on an up-and-coming new HTTP server named Mongrel that is winning accolades all over the community. JRuby on Rails Unveiled at JavaOne<http://www.infoq.com/news/JRuby-on-Rails-JavaOne> The latest version of JRuby will be presented to JavaOne attendees this week. Included in the demonstrations is a working Rails application and an ActiveRecord adapter backed by JDBC. Canadian Firm Posts Bounty for New Rails Database Support<http://www.infoq.com/news/odbtp_bounty_announced> ICI, a stainless steel truck accessory business in Canada, today announced a 900USD bounty to the first person to deliver ODBTP support for Rails. ODBTP (Open Database Transport Protocol) is a TCP/IP protocol ideal for connecting Linux-based programs to ODBC data sources on Windows servers. _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
InfoQ was "unlaunched" last week, (meaning we''re still doing some final bug-fixing), but you should still check it out and see all the good stuff we have so far. Exclusive video interviews with DHH, David Black and other well-known Rubyists, as well as presentations such as Charles and Tom demo''ing JRuby at JavaOne last week are coming soon. I''m serving as the Ruby community editor, so contact me via email if you''re interested in contributing news or articles. BTW, the founder of InfoQ.com, Floyd Marinescu, is famous for starting theserverside.com, one of the world''s most popular technical websites. He''s a big fan of Ruby and Rails and we''re proud of working together to be the first site to give Ruby top-billing along with Java, .NET and other topics such as Agile and SOA. For your convenience, here is a list of all content and news on InfoQ<http://www.infoq.com/>about Ruby to date... Agile Asset Management with Ruby DSLs<http://www.infoq.com/articles/Agile-Asset-Management> Ruby makes it easy to craft Domain-Specific-Languages with Ruby syntax. This article is a story about the benefits derived from implementing a Ruby DSL for a PLANET ARGON development project. Ruby and Rails: In your face... but out of your way<http://www.infoq.com/articles/Ruby-and-Rails-In-your-face> Ruby on Rails is in many ways a system in itself. But in many, many other ways, Rails exposes, explores, and exploits its connections to Ruby, rather than hiding or disguising them. David A. Black, author of the book Ruby for Rails from Manning, shares his thoughts on whether or not Rails developers should take the time to master Ruby. News about Ruby Ruby Coverage Tool Making Rapid Progress<http://www.infoq.com/news/Ruby-Coverage-Tool-Progress> Earlier this week, Mauricio Fernandez released version 0.4 of Rcov, his tool for simple code coverage analysis in Ruby. Rcov is fast, feature-packed and progressing rapidly. New Rails Powered Sites Announced<http://www.infoq.com/news/New-Rails-Powered-Sites-Announce> A couple of shiny new Rails-powered websites were announced in the last couple of days. Invitika is described as SMS + mobile blogging + event planning + LBS + photos. Thebeststuffintheworld.com is a comprehensive database of, well, the best stuff in the world, just as implied by the name. RailsDay 2006 Announced <http://www.infoq.com/news/RailsDay-2006-Announced> RailsDay 2006 is a 24 hour competition scheduled to be held in mid-June, right before RailsConf. During the contest, teams of Ruby on Rails developers from around the world will compete for valuable prizes to see who can author the best Rails application in just a day. Interview with Mongrel Author Zed Shaw<http://www.infoq.com/news/Interview-with-Mongrel-Author-Ze> Well-known Rails programmer Zed Shaw was interviewed by O''Reilly. Zed talked about Ruby on Rails and his work on an up-and-coming new HTTP server named Mongrel that is winning accolades all over the community. JRuby on Rails Unveiled at JavaOne<http://www.infoq.com/news/JRuby-on-Rails-JavaOne> The latest version of JRuby will be presented to JavaOne attendees this week. Included in the demonstrations is a working Rails application and an ActiveRecord adapter backed by JDBC. Canadian Firm Posts Bounty for New Rails Database Support<http://www.infoq.com/news/odbtp_bounty_announced> ICI, a stainless steel truck accessory business in Canada, today announced a 900USD bounty to the first person to deliver ODBTP support for Rails. ODBTP (Open Database Transport Protocol) is a TCP/IP protocol ideal for connecting Linux-based programs to ODBC data sources on Windows servers. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060525/c571328b/attachment.html
My rails app will occasionally throw a TypeError. I did a goolge and it **looks** like this is because I am trying to Marshal an object with a singleton method. Can anyone confirm this? Objects with singleton methods cannot be Marshalled? Thanks, Steven
On Jul 2, 2006, at 10:45 AM, Steven Hansen wrote:> > > My rails app will occasionally throw a TypeError. I did a goolge > and it **looks** like this is because I am trying to Marshal an > object with a singleton method. Can anyone confirm this? Objects > with singleton methods cannot be Marshalled? > > Thanks, > Steven > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/railsSteven- Well you cannot marshal any objects that contain lambda''s, proc''s, Proc.new Or UnBoundMethod''s. As far as the singleton methods go you are correct. But singleton methods refer to a number of different things in ruby depending on who you ask ;) Maybe this helps to clarify: ez mobiushq $ irb --simple-prompt >> class Foo >> class << self >> def hi >> puts "hi" >> end >> end >> end => nil >> Foo.hi hi => nil >> foo = Marshal.dump Foo => "\004\010c\010Foo" >> Marshal.load foo => Foo >> foo = Foo.new => #<Foo:0x3507f8> >> def foo.bar >> puts ''bar!'' >> end => nil >> foo.bar bar! => nil >> f = Marshal.dump foo TypeError: singleton can''t be dumped from (irb):16:in `dump'' from (irb):16 from :0 >> Cheers- -Ezra
Hi Ezra, My object''s singleton method is defined in the class definition, as opposed to being defined on an instance of the object. I think this is still a singleton method, just a different context--I am still a little hazy when it come to understanding ruby''s object structure. Anyway, this doesn''t throw any errors when I Marshal it, so my problem must lie else where. Thanks, Steven rooster@mobile-pen > irb irb(main):001:0> class Foo irb(main):002:1> def self.bar irb(main):003:2> puts "bar" irb(main):004:2> end irb(main):005:1> end => nil irb(main):006:0> irb(main):007:0* dumped = Marshal.dump(Foo.new) => "\004\010o:\010Foo\000" irb(main):008:0> loaded = Marshal.load dumped => #<Foo:0x4021d4e4> Ezra Zygmuntowicz wrote:> > On Jul 2, 2006, at 10:45 AM, Steven Hansen wrote: > >> >> >> My rails app will occasionally throw a TypeError. I did a goolge >> and it **looks** like this is because I am trying to Marshal an >> object with a singleton method. Can anyone confirm this? Objects >> with singleton methods cannot be Marshalled? >> >> Thanks, >> Steven >> _______________________________________________ >> Rails mailing list >> Rails@lists.rubyonrails.org >> http://lists.rubyonrails.org/mailman/listinfo/rails > > > > Steven- > > Well you cannot marshal any objects that contain lambda''s, > proc''s, Proc.new Or UnBoundMethod''s. As far as the singleton methods > go you are correct. But singleton methods refer to a number of > different things in ruby depending on who you ask ;) Maybe this helps > to clarify: > > ez mobiushq $ irb --simple-prompt > >> class Foo > >> class << self > >> def hi > >> puts "hi" > >> end > >> end > >> end > => nil > >> Foo.hi > hi > => nil > >> foo = Marshal.dump Foo > => "\004\010c\010Foo" > >> Marshal.load foo > => Foo > >> foo = Foo.new > => #<Foo:0x3507f8> > >> def foo.bar > >> puts ''bar!'' > >> end > => nil > >> foo.bar > bar! > => nil > >> f = Marshal.dump foo > TypeError: singleton can''t be dumped > from (irb):16:in `dump'' > from (irb):16 > from :0 > >> > > > Cheers- > -Ezra > > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails