[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Ruby Interactive Shell

Jenjhiz

2/6/2005 5:58:00 PM

Hello,
I'm looking for a Ruby interactive shell where I can paste snippet of
codes (rather than typing them in). eval.rb doesn't do it (or I haven't
found a way to make it do it).
Thanks!
gk

17 Answers

Tom Rathbone

2/6/2005 6:03:00 PM

0

On Mon, 7 Feb 2005 03:00:11 +0900, Jenjhiz <jenjhiz@yahoo.com> wrote:
> Hello,
> I'm looking for a Ruby interactive shell where I can paste snippet of
> codes (rather than typing them in). eval.rb doesn't do it (or I haven't
> found a way to make it do it).
> Thanks!
> gk
>
Tried this? http://rubyforge.org/proje...


Tom Rathbone

2/6/2005 6:06:00 PM

0

On Sun, 6 Feb 2005 18:02:41 +0000, Tom Rathbone <tom.rathbone@gmail.com> wrote:
> On Mon, 7 Feb 2005 03:00:11 +0900, Jenjhiz <jenjhiz@yahoo.com> wrote:
> > Hello,
> > I'm looking for a Ruby interactive shell where I can paste snippet of
> > codes (rather than typing them in). eval.rb doesn't do it (or I haven't
> > found a way to make it do it).
> > Thanks!
> > gk
> >
> Tried this? http://rubyforge.org/proje...
>
Hmm no files released?

Try http://redhanded.hobix.com/bits/fancyIrbBuriedInTh...


Charles Mills

2/6/2005 6:34:00 PM

0


Jenjhiz wrote:
> Hello,
> I'm looking for a Ruby interactive shell where I can paste snippet of
> codes (rather than typing them in). eval.rb doesn't do it (or I
haven't
> found a way to make it do it).
> Thanks!
> gk

There is an answer to your question at the bottom of this page:
http://rubygarden.org/ruby?Irb/Tip...

<snip>
If you add this to your .irbrc file:
IRB.conf[:PROMPT][:XMP][:RETURN] = "\# => %s\n"

and start with irb --prompt xmp you'll have a great session for copying
and pasting code.
</snip>

-Charlie

Robert Klemme

2/6/2005 6:38:00 PM

0


"Jenjhiz" <jenjhiz@yahoo.com> schrieb im Newsbeitrag
news:1107712653.191178.87950@o13g2000cwo.googlegroups.com...
> Hello,
> I'm looking for a Ruby interactive shell where I can paste snippet of
> codes (rather than typing them in). eval.rb doesn't do it (or I haven't
> found a way to make it do it).
> Thanks!
> gk

IRB comes with your Ruby installation.

Kind regards

robert

Kent Sibilev

2/6/2005 7:03:00 PM

0

If you are emacs user, ruby-mode provides that (C-c C-r
ruby-send-region).

Cheers,
Kent.

On Feb 6, 2005, at 1:00 PM, Jenjhiz wrote:

> Hello,
> I'm looking for a Ruby interactive shell where I can paste snippet of
> codes (rather than typing them in). eval.rb doesn't do it (or I haven't
> found a way to make it do it).
> Thanks!
> gk
>
>



Martin DeMello

2/6/2005 7:38:00 PM

0

Tom Rathbone <tom.rathbone@gmail.com> wrote:
> On Sun, 6 Feb 2005 18:02:41 +0000, Tom Rathbone <tom.rathbone@gmail.com> wrote:
> >
> Hmm no files released?
>
> Try http://redhanded.hobix.com/bits/fancyIrbBuriedInTh...

My fault, I'm afraid - I've had zero time to work on this lately :( I'll
try to have the basic keybindings finished by the end of the week and
put out a 0.01 release. The CVS version already has indenting and some
level of dedenting working, which is the other half of what I wanted
before I released it. Forthcoming features (short term):

1. A few decent key bindings
2. Multiline edit
3. Integration with ihelp

Feature requests happily accepted. I'm also pondering an IRC-style input box
and output pane - any thoughts?

martin

Caio Tiago Oliveira

2/6/2005 9:03:00 PM

0

Charles Mills, 6/2/2005 15:35:
irb --prompt xmp you'll have a great session for copying
> and pasting code.


But you can't paste code that contains '?' because IRB wil think it
shoulds autocomplete.
Also irb crashes a lot.



Jeremy Henty

2/7/2005 12:04:00 AM

0

In article <420687D1.6030908@ibest.com.br>, Caio Tiago Oliveira wrote:

> Also irb crashes a lot.

Say what? I've been an enthusiastic Ruby/Irb user for around 2 years
now and I've *never* seen irb crash. What platform are you running
on?

Jeremy Henty

Caio Tiago Oliveira

2/7/2005 12:36:00 AM

0

Jeremy Henty, 6/2/2005 21:05:
> In article <420687D1.6030908@ibest.com.br>, Caio Tiago Oliveira wrote:
>
>> Also irb crashes a lot.
>
> Say what? I've been an enthusiastic Ruby/Irb user for around 2 years
> now and I've *never* seen irb crash. What platform are you running
> on?

I'm in a PC platform, WinXP as Operating System.
Irb crashes mainly when I use the autocompletion (the bigger the number
of possibilities the worse)or when I'm overriding a method.

It says... (let me crash it now):
"irb(main):003:0* c:/ruby/lib/ruby/1.8/irb/workspace.rb:52: [BUG]
Segmentation fault
ruby 1.8.2 (2004-12-25) [i386-mswin32]


This application has requested the Runtime to terminate it in an unusual
way.
Please contact the application's support team for more information."

I don't know wether it has been reported already, but always that I type
a variable name, press Enter and then Tab it crashes.

>> a = 1
>>a.
<<press tab>>

crash!

But it also crash a lot in day by day work.



jenjhiz

2/7/2005 5:12:00 AM

0

Thanks for the lead. However, I can't find an .irbrc file anywhere in
my machine (Windows XP). Where is it located?

Thanks,
gk


Charles Mills wrote:
> Jenjhiz wrote:
> > Hello,
> > I'm looking for a Ruby interactive shell where I can paste snippet
of
> > codes (rather than typing them in). eval.rb doesn't do it (or I
> haven't
> > found a way to make it do it).
> > Thanks!
> > gk
>
> There is an answer to your question at the bottom of this page:
> http://rubygarden.org/ruby?Irb/Tip...
>
> <snip>
> If you add this to your .irbrc file:
> IRB.conf[:PROMPT][:XMP][:RETURN] = "\# => %s\n"
>
> and start with irb --prompt xmp you'll have a great session for
copying
> and pasting code.
> </snip>
>
> -Charlie