Martin DeMello | 1 Aug 2008 01:05
Picon

Re: File manipulation

On Thu, Jul 31, 2008 at 1:48 PM, Shadowfirebird
<shadowfirebird <at> gmail.com> wrote:
> Event.new(Sword.new.strike(:martin))

hey!!!!

martin

Michal Suchanek | 1 Aug 2008 01:10
Picon
Favicon

Re: Input redirection in ruby

On 31/07/2008, Robert Klemme <shortcutter <at> googlemail.com> wrote:
> On 31.07.2008 16:10, Michal Suchanek wrote:
>
> > I could not find any way to redirect input and output of programs in ruby.
> >
> > You can capture the fds but not redirect AFAICT.
> >
>
>  You can - and it's pretty easy also.  The key feature to know is IO#reopen:

Yes, this makes stuff much easier. Still to do what shell does when
you use a shell pipe you need a working fork. I am not sure how fork
is emulated on platforms that use spawn like Windows.

According to porting tutorials passing the fd's is possible with the
windows API but doing a full fork() is hard - it normally requires
copying the whole address space manually because part of the NT core
functionality is not exposed in the Win32 API.

Thanks

Michal

Bishal Acharya | 1 Aug 2008 03:05
Picon

link_to_remote not working for remote ip calls

Why is link_to_remote not working when i actually make a call to
different application from the one i am currently in.

I am in ip1 and i want to make remote calls to ip2 from ip1 but i am
unable to do it, but when i try the same code to access ip1 then i am
easily greeted with the response...sahll i have to make some
configuration adjustments or.....any suggestions..
--

-- 
Posted via http://www.ruby-forum.com/.

Gregory Brown | 1 Aug 2008 03:22
Picon

Re: link_to_remote not working for remote ip calls

On Thu, Jul 31, 2008 at 9:05 PM, Bishal Acharya <bishalacharya <at> gmail.com> wrote:
> Why is link_to_remote not working when i actually make a call to
> different application from the one i am currently in.
>
> I am in ip1 and i want to make remote calls to ip2 from ip1 but i am
> unable to do it, but when i try the same code to access ip1 then i am
> easily greeted with the response...sahll i have to make some
> configuration adjustments or.....any suggestions..

I see that you've already posted to the Ruby on Rails - Talk mailing
list.  That's the right place for this sort of question.

-greg

Greg Akins | 1 Aug 2008 03:31
Picon
Gravatar

New to Ruby, question about gem

I had just installed Rails 2.1.0, or at least that's the feedback I got
when I typed "gem install rails"

However, when I look in my gem paths I see that rails-1.2.6 is the only
directory there.

Am I missing something.  Is Rails 2.1.0 stored somewhere else (gem
environment gave me two paths, I checked them both).

Sorry if this is a stupid question, I'm still finding my way around.

Thanks!
--

-- 
Posted via http://www.ruby-forum.com/.

Skave Rat | 1 Aug 2008 03:33

problem with "starts_with?"

How can I get this code to work in my classes?
http://api.rubyonrails.org/classes/ActiveSupport/CoreExtensions/String/StartsEndsWith.html

I'd like to have all my custom methods located in one file, which I can
just include
--

-- 
Posted via http://www.ruby-forum.com/.

Thomas Sawyer | 1 Aug 2008 05:02
Picon
Gravatar

JuneBug or Instiki or ?

Where's the Ruby WikiWiki at?

T.
--

-- 
Posted via http://www.ruby-forum.com/.

Daniel Berger | 1 Aug 2008 05:03
Picon
Gravatar

refactor.rb (decoration plus AOP)

Hi all,

Courtesy of Yuki Sonoda, I stumbled across this:

http://gist.github.com/1724

Looks pretty cool to me. Decoration plus AOP!

Ara, have you already done something like this?

Just thought I'd mention it.

Regards,

Dan

matt neuburg | 1 Aug 2008 05:09
Favicon
Gravatar

Re: problem with "starts_with?"

Skave Rat <skaverat <at> rf-linux.org> wrote:

> How can I get this code to work in my classes?
> http://api.rubyonrails.org/classes/ActiveSupport/CoreExtensions/String/
> StartsEndsWith.html

require 'rubygems'
require 'activesupport'
include ActiveSupport::CoreExtensions::String

puts "howdy".starts_with?("ho")

Is that the kind of thing you mean? m.
--

-- 
matt neuburg, phd = matt <at> tidbits.com, http://www.tidbits.com/matt/
Leopard - http://www.takecontrolbooks.com/leopard-customizing.html
AppleScript - http://www.amazon.com/gp/product/0596102119
Read TidBITS! It's free and smart. http://www.tidbits.com

M. Edward (Ed) Borasky | 1 Aug 2008 05:50
Favicon

Re: gc doesn't collect?

On Fri, 2008-08-01 at 01:24 +0900, Dave Bass wrote:
> The thing with garbage collection (in most languages, I don't know about 
> Ruby specifically) is that it happens when the intepreter/compiler feels 
> like doing it, not when you tell it to do it. When it "feels like doing 
> it" could depend on a lot of factors. (I imagine it as being a low 
> priority child process.)
> 
> As far as I know there's no way to force garbage collection to happen, 
> although on the face of it this would seem to be a useful facility.
gc.start ... right?
--

-- 
M. Edward (Ed) Borasky
ruby-perspectives.blogspot.com

"A mathematician is a machine for turning coffee into theorems." --
Alfréd Rényi via Paul Erdős


Gmane