Re: Camping and ruby2ruby

2007-09-28 Thread Jonas Pfenniger
2007/9/28, MenTaLguY [EMAIL PROTECTED]:
 Perhaps condensing ?

Yes, with a little touch of artistic sense added :)

Cheers,
  zimbatm
___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list


Re: Camping and ruby2ruby

2007-09-27 Thread Jonas Pfenniger
Hi Gregor,

I wasn't able to track the error on Camping side, but it comes from
r2r that defines nil.error_missing.

2007/9/27, Gregor Schmidt [EMAIL PROTECTED]:
 require rubygems
 require ruby2ruby

# It works in this case but probably breaks r2r on a larger scale.
class NilClass
  undef method_missing
end

 Camping.goes :Test

 module Test
   module Controllers
 class Index  R '/'
   def get
 div.literate_programming! do
   example { 1 + 1 == 2 }
 end
   end
 end
   end

   module Helpers
 def example(block)
   pre( block.to_ruby.gsub(/^proc \{\n(.*)\n\}$/m, '\1'))
 end
   end
 end

 I don't know where the :href attribute comes from and I don't know,
 why it only appears within camping and not in markaby itself.

Camping overrides [:href,:action,:src] to translate relative links to
absolute ones. See Mab at the end of camping-unabridged.

-- 
Cheers,
  zimbatm
___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list


Re: Camping and ruby2ruby

2007-09-27 Thread Jonas Pfenniger
2007/9/27, Gregor Schmidt [EMAIL PROTECTED]:
 Defining NilClass#method_missing for nothing is not too clever, for a
 large scale libary IMO.

I'm not sure you understood, it is ruby2ruby who defined
nil.method_missing. We can't start to support each and every hack a
library will add to the Ruby core.

-- 
Cheers,
  zimbatm
___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list


Re: Camping and ruby2ruby

2007-09-27 Thread John Beppu
On 9/27/07, Jonas Pfenniger [EMAIL PROTECTED] wrote:

 2007/9/27, Gregor Schmidt [EMAIL PROTECTED]:
  Defining NilClass#method_missing for nothing is not too clever, for a
  large scale libary IMO.

 I'm not sure you understood, it is ruby2ruby who defined
 nil.method_missing. We can't start to support each and every hack a
 library will add to the Ruby core.



^for this reason, you can't really use ruby2ruby in anything serious.
nil.method_missing prevents a lot of exceptions from being thrown, and
there's a lot of code out their that legitimately needs those exceptions to
be thrown for correct behavior.
___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list

Re: Camping and ruby2ruby

2007-09-27 Thread Manfred Stienstra
On Sep 27, 2007, at 7:35 PM, John Beppu wrote:
 ^for this reason, you can't really use ruby2ruby in anything  
 serious.  nil.method_missing prevents a lot of exceptions from  
 being thrown, and there's a lot of code out their that legitimately  
 needs those exceptions to be thrown for correct behavior.

require 'ruby2ruby'
class NilClass
   undef method_missing
end

Solved?

___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list


Re: Camping and ruby2ruby

2007-09-27 Thread Gregor Schmidt
Sorry, if I was misunderstood with saying

 Defining NilClass#method_missing for nothing is not too clever, for a
 large scale libary IMO.

I was insulting ruby2ruby and not camping. So everthing is okay on this side.

I solved my particular problem with the combination of caming and
ruby2ruby and will not use it for something serious - just academics.

I was looking for help, concerning this issue, found it, thankfully,
on this list and will post a blog entry tomorrow, so other probably
will find it as well.

From my side, everything is okay at this point. Thanks again for the
hint. There is nothing I could see, that should be changed inside of
caming to allow such a strange of standard behaviour.

Cheers,

Gregor
___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list