 |
|
 |
 |

|
|
|
|
This looks like a nice gem. I installed it, and placed the neccessary lines in my .irbrc file. However, upon starting irb, the features are not active. Doing
irb(main):001:0> require 'rubygems'
=> false
irb(main):002:0> require 'wirble'
=> true
Then it works. So it's not properly loading. Any suggestions?
Cheers,
Brett
|
|
|
|
Hey there, I love your Wirble project! One problem, in the source code, Ruby 1.9 breaks when you use a ":" instead of "then" in "if", "unless", and "when" statements (probably others too).
When I first installed the gem it gave me like 11 errors, but after replacing the colons in wirble.rb with "then"s or removing them outright it works perfectly.
|
|
|
|
Two things:
First, I can't seem to get the colors to work correctly.
1) The ~/.irbrc below only changes the comma color
2) The color doesn't take effect unless I leave in "Wirble.colorize", which shouldn't be necessary, right?
Second, is there any way to make this work with pretty print?
Other than that, I love it.
Thanks,
John
## My .irbc ##
# load libraries
require 'rubygems'
require 'wirble'
wirble_opts = {
# skip shortcuts
:skip_shortcuts => true,
# don't set the prompt
:skip_prompt => true,
# override some of the default colors
:colors => {
:object_addr_prefix => :yellow,
:comma => :white,
},
# enable color
:init_color => true,
}
# initialize wirble with options above
Wirble.init(wirble_opts)
Wirble.colorize
|
|
|
|
I love this, even if I'm just using it for the colorization. If only terminal color codes supported more colors.
Anyway, one small bug to report, regular expression literals don't display the slashes when colors are enabled:
with colorization:
irb(main):001:0> /hello/
=> hello
normal (correct) behavior:
irb(main):001:0> /hello/
=> /hello/
Thanks :)
|
|
|
|
I couldn't find the Wirble bug tracker...but I found an interesting bug. With Wirble enabled, when I type:
require 'mathn'; 2/3
#=> 23
also,
require 'mathn'; (2/3).class
#=> Rational
it appears to me that it concatenates the two numbers as strings then outputs then as a Rational? Or it's some sort of error with the way Wirble represents fractional values.
Thanks for making a great irb enhancement, though! I've used Wirble since it was first announced.
|
|
|
|
save_history has a bug, I believe
This is an error. (line 83 or so):
# lines = lines[-max_size, -1] if lines.size > max_size
Use this instead:
lines = lines.last(max_size)
|
|
|
 |
 |
|
 |