<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: New magical version of Symbol.to_proc</title>
	<atom:link href="http://drnicwilliams.com/2006/09/28/new-magical-version-of-symbolto_proc/feed/" rel="self" type="application/rss+xml" />
	<link>http://drnicwilliams.com/2006/09/28/new-magical-version-of-symbolto_proc/</link>
	<description>Ruby makes Rails, Javascript makes Ajax, Dr Nic makes Magic</description>
	<lastBuildDate>Tue, 16 Mar 2010 14:19:45 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: levitra</title>
		<link>http://drnicwilliams.com/2006/09/28/new-magical-version-of-symbolto_proc/comment-page-1/#comment-125376</link>
		<dc:creator>levitra</dc:creator>
		<pubDate>Sun, 28 Sep 2008 15:52:19 +0000</pubDate>
		<guid isPermaLink="false">http://drnicwilliams.com/2006/09/28/new-magical-version-of-symbolto_proc/#comment-125376</guid>
		<description>&lt;strong&gt;buy levitra online...&lt;/strong&gt;

Stop suffering and buy levitra without prescription, attached is a link....</description>
		<content:encoded><![CDATA[<p><strong>buy levitra online&#8230;</strong></p>
<p>Stop suffering and buy levitra without prescription, attached is a link&#8230;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nikos D.</title>
		<link>http://drnicwilliams.com/2006/09/28/new-magical-version-of-symbolto_proc/comment-page-1/#comment-83049</link>
		<dc:creator>Nikos D.</dc:creator>
		<pubDate>Sat, 19 Apr 2008 17:11:51 +0000</pubDate>
		<guid isPermaLink="false">http://drnicwilliams.com/2006/09/28/new-magical-version-of-symbolto_proc/#comment-83049</guid>
		<description>&lt;strong&gt;Tiny (but maybe important) Rubinius tidbits...&lt;/strong&gt;

As you play with a tool you progressively discover various small tidbits about it. I have a few in mind and I thought it would helpful to share them in case you encounter them and get this weird expression on your face of &quot;huh?&quot;.
1. The multiple ass...</description>
		<content:encoded><![CDATA[<p><strong>Tiny (but maybe important) Rubinius tidbits&#8230;</strong></p>
<p>As you play with a tool you progressively discover various small tidbits about it. I have a few in mind and I thought it would helpful to share them in case you encounter them and get this weird expression on your face of &#8220;huh?&#8221;.<br />
1. The multiple ass&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dynamic and Concise</title>
		<link>http://drnicwilliams.com/2006/09/28/new-magical-version-of-symbolto_proc/comment-page-1/#comment-61969</link>
		<dc:creator>Dynamic and Concise</dc:creator>
		<pubDate>Tue, 04 Dec 2007 16:15:39 +0000</pubDate>
		<guid isPermaLink="false">http://drnicwilliams.com/2006/09/28/new-magical-version-of-symbolto_proc/#comment-61969</guid>
		<description>&lt;strong&gt;Collect Syntax Study...&lt;/strong&gt;

Stephen Chu talked about how to beautify statements like customers.collect { &#124;customer&#124; customer.name...</description>
		<content:encoded><![CDATA[<p><strong>Collect Syntax Study&#8230;</strong></p>
<p>Stephen Chu talked about how to beautify statements like customers.collect { |customer| customer.name&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Collect Syntax Study &#171; Dynamic and Concise</title>
		<link>http://drnicwilliams.com/2006/09/28/new-magical-version-of-symbolto_proc/comment-page-1/#comment-61967</link>
		<dc:creator>Collect Syntax Study &#171; Dynamic and Concise</dc:creator>
		<pubDate>Tue, 04 Dec 2007 16:10:57 +0000</pubDate>
		<guid isPermaLink="false">http://drnicwilliams.com/2006/09/28/new-magical-version-of-symbolto_proc/#comment-61967</guid>
		<description>[...] like customers.collect { &#124;customer&#124; customer.name } in one of his posts. Dr. Nic also has a post talking about the same thing. It&#8217;s very interesting to see so many people want to get away [...]</description>
		<content:encoded><![CDATA[<p>[...] like customers.collect { |customer| customer.name } in one of his posts. Dr. Nic also has a post talking about the same thing. It&#8217;s very interesting to see so many people want to get away [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bug</title>
		<link>http://drnicwilliams.com/2006/09/28/new-magical-version-of-symbolto_proc/comment-page-1/#comment-42807</link>
		<dc:creator>Bug</dc:creator>
		<pubDate>Sun, 19 Aug 2007 02:43:37 +0000</pubDate>
		<guid isPermaLink="false">http://drnicwilliams.com/2006/09/28/new-magical-version-of-symbolto_proc/#comment-42807</guid>
		<description>Yo, sorry to dig this out of its grave, but I can&#039;t help interjecting on your &#039;non-fix&#039; to the problem that Piggybox brought up.  All you would have to do to fix that silly problem is change the last line of your mini-library to &quot;Enumerable.send :include, GenericMapToProc&quot;.  The results of Thing#find_all or one-to-many attibutes aren&#039;t Arrays, but they are Enumerable.

Pretty clever stuff, nonetheless.</description>
		<content:encoded><![CDATA[<p>Yo, sorry to dig this out of its grave, but I can&#8217;t help interjecting on your &#8216;non-fix&#8217; to the problem that Piggybox brought up.  All you would have to do to fix that silly problem is change the last line of your mini-library to &#8220;Enumerable.send :include, GenericMapToProc&#8221;.  The results of Thing#find_all or one-to-many attibutes aren&#8217;t Arrays, but they are Enumerable.</p>
<p>Pretty clever stuff, nonetheless.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dr Nic</title>
		<link>http://drnicwilliams.com/2006/09/28/new-magical-version-of-symbolto_proc/comment-page-1/#comment-36638</link>
		<dc:creator>Dr Nic</dc:creator>
		<pubDate>Mon, 09 Jul 2007 08:32:07 +0000</pubDate>
		<guid isPermaLink="false">http://drnicwilliams.com/2006/09/28/new-magical-version-of-symbolto_proc/#comment-36638</guid>
		<description>@macovsky [&lt;a href=&quot;http://drnicwilliams.com/2006/09/28/new-magical-version-of-symbolto_proc/#comment-36631&quot; rel=&quot;nofollow&quot;&gt;via&lt;/a&gt;] - No problems. &lt;code&gt;brand.products&lt;/code&gt; doesn&#039;t return an Array, rather an &lt;code&gt;AssociationProxy&lt;/code&gt;. Currently map_by_method only works on Array, and I haven&#039;t figured out how to make it work on the AP.

I tried once, it didn&#039;t work, so I moved on :P Guess I should try again; its annoying that it doesn&#039;t work the same way.</description>
		<content:encoded><![CDATA[<p>@macovsky [<a href="http://drnicwilliams.com/2006/09/28/new-magical-version-of-symbolto_proc/#comment-36631" rel="nofollow">via</a>] &#8211; No problems. <code>brand.products</code> doesn&#8217;t return an Array, rather an <code>AssociationProxy</code>. Currently map_by_method only works on Array, and I haven&#8217;t figured out how to make it work on the AP.</p>
<p>I tried once, it didn&#8217;t work, so I moved on <img src='http://drnicwilliams.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' />  Guess I should try again; its annoying that it doesn&#8217;t work the same way.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: macovsky</title>
		<link>http://drnicwilliams.com/2006/09/28/new-magical-version-of-symbolto_proc/comment-page-1/#comment-36631</link>
		<dc:creator>macovsky</dc:creator>
		<pubDate>Mon, 09 Jul 2007 08:03:42 +0000</pubDate>
		<guid isPermaLink="false">http://drnicwilliams.com/2006/09/28/new-magical-version-of-symbolto_proc/#comment-36631</guid>
		<description>hi there, Nic, sorry for such an old question :)

could you explain that behaviour of &#039;map_by_method&#039; with activerecord?

Product.find(:all).collect_save — works fine

Brand.find(:first).products.collect_save — got NoMethodError

but Brand.find(:first).products.collect &amp;:save — is ok</description>
		<content:encoded><![CDATA[<p>hi there, Nic, sorry for such an old question <img src='http://drnicwilliams.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>could you explain that behaviour of &#8216;map_by_method&#8217; with activerecord?</p>
<p>Product.find(:all).collect_save — works fine</p>
<p>Brand.find(:first).products.collect_save — got NoMethodError</p>
<p>but Brand.find(:first).products.collect &amp;:save — is ok</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dr Nic</title>
		<link>http://drnicwilliams.com/2006/09/28/new-magical-version-of-symbolto_proc/comment-page-1/#comment-17383</link>
		<dc:creator>Dr Nic</dc:creator>
		<pubDate>Thu, 19 Apr 2007 11:29:48 +0000</pubDate>
		<guid isPermaLink="false">http://drnicwilliams.com/2006/09/28/new-magical-version-of-symbolto_proc/#comment-17383</guid>
		<description>Currently:
&lt;pre&gt;module MapByMethod
  def self.included(base)
    super
    
    base.module_eval &lt;&lt;-EOS
      def method_missing(method, *args, &amp;block)
...
&lt;/pre&gt;

if I remove the included/mod_eval:
&lt;pre&gt;module MapByMethod
  def method_missing(method, *args, &amp;block)
...
&lt;/pre&gt;

the tests stop working. I think its because ActiveRecord::Base defines #method_missing, so the module&#039;s version is not first in the chain.

Perhaps aliasing might be an alternative?</description>
		<content:encoded><![CDATA[<p>Currently:</p>
<pre>module MapByMethod
  def self.included(base)
    super

    base.module_eval < <-EOS
      def method_missing(method, *args, &#038;block)
...
</pre>
<p>if I remove the included/mod_eval:
</pre>
<pre>module MapByMethod
  def method_missing(method, *args, &#038;block)
...
</pre>
<p>the tests stop working. I think its because ActiveRecord::Base defines #method_missing, so the module's version is not first in the chain.</p>
<p>Perhaps aliasing might be an alternative?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jim Weirich</title>
		<link>http://drnicwilliams.com/2006/09/28/new-magical-version-of-symbolto_proc/comment-page-1/#comment-17315</link>
		<dc:creator>Jim Weirich</dc:creator>
		<pubDate>Thu, 19 Apr 2007 00:59:52 +0000</pubDate>
		<guid isPermaLink="false">http://drnicwilliams.com/2006/09/28/new-magical-version-of-symbolto_proc/#comment-17315</guid>
		<description>Hi Dr. Nic.  A friend pointed me toward your blog and I&#039;m loving your meta-magic marvels.  I hope you don&#039;t mind a question on this older post.

You embed you method_missing definition inside a module_eval.  It seems to me to be sufficient to avoid the included hook and the module_eval altogether and just define method_missing directly in the module.  Not only is it simpler, it plays better with the including class if it also defines a method_missing.  Is there a reason for included/module_eval that I&#039;m not seeing?

Thanks ... keep those magic moments coming.</description>
		<content:encoded><![CDATA[<p>Hi Dr. Nic.  A friend pointed me toward your blog and I&#8217;m loving your meta-magic marvels.  I hope you don&#8217;t mind a question on this older post.</p>
<p>You embed you method_missing definition inside a module_eval.  It seems to me to be sufficient to avoid the included hook and the module_eval altogether and just define method_missing directly in the module.  Not only is it simpler, it plays better with the including class if it also defines a method_missing.  Is there a reason for included/module_eval that I&#8217;m not seeing?</p>
<p>Thanks &#8230; keep those magic moments coming.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: KDr2 &#187; 简单漂亮的打包GEM</title>
		<link>http://drnicwilliams.com/2006/09/28/new-magical-version-of-symbolto_proc/comment-page-1/#comment-2204</link>
		<dc:creator>KDr2 &#187; 简单漂亮的打包GEM</dc:creator>
		<pubDate>Fri, 05 Jan 2007 07:49:25 +0000</pubDate>
		<guid isPermaLink="false">http://drnicwilliams.com/2006/09/28/new-magical-version-of-symbolto_proc/#comment-2204</guid>
		<description>[...] 1.目标: 把 Map by Method(曾经叫做 Map by Pluralisation) library 打包成gem。 查看我们将要打包的代码的相关链接:original and demo。 [...]</description>
		<content:encoded><![CDATA[<p>[...] 1.目标: 把 Map by Method(曾经叫做 Map by Pluralisation) library 打包成gem。 查看我们将要打包的代码的相关链接:original and demo。 [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
