Change "print" to "putc" circa line 316 in autotest.rb
This will break if you're using UTF accented characters.
See the following...
$ jruby -S test.rb | |
one | |
sentence | |
two | |
a very l | |
ong sentence three |
message = "something%sh: gimme: not found\r\n" | |
message = message.split('%')[1] | |
message.lines do |line| | |
puts line | |
# puts line.strip # also fails | |
end |
see: https://jira.codehaus.org/browse/JRUBY-6116 | |
RubyString.java:5688:in `singleByteStrip19': java.lang.ArrayIndexOutOfBoundsExce | |
ption: 51 | |
from RubyString.java:5660:in `strip_bang19' | |
from RubyString.java:5649:in `strip19' | |
from RubyString$i$0$0$strip19.gen:65535:in `call' | |
from CachingCallSite.java:133:in `call' | |
from CallNoArgNode.java:63:in `interpret' | |
from NewlineNode.java:104:in `interpret' |
def log(level, message, line_prefix=nil) | |
if level <= self.level | |
indent = "%*s" % [MAX_LEVEL, "*" * (MAX_LEVEL - level)] | |
(RUBY_VERSION >= "1.9" ? message.lines : message).each do |line| | |
if line_prefix | |
device.puts "#{indent} [#{line_prefix}] #{line.strip}\n" | |
else | |
device.puts "#{indent} #{line.strip}\n" | |
end | |
end |
--- RubyGems | |
Gem.dir: /usr/local/rvm/gems/jruby-1.6.4 | |
Gem.path: | |
/home/glfish/glassfishv3/glassfish/domains/domain1/applications/my-app/WEB-INF/gems | |
/usr/local/rvm/gems/jruby-1.6.4 | |
/usr/local/rvm/gems/jruby-1.6.4@global | |
Activated gems: | |
bundler-1.0.18 | |
--- Bundler |
'To get this to work you need to add the regexp reference. | |
'From Visual Basic: Tools -> References... make sure "Microsoft VBScript Regular Expressions 5.5" is checked | |
Sub breakUpMultiYearRows() | |
'doesn't work on mac | |
Dim r As New VBScript_RegExp_55.RegExp | |
r.Pattern = "(\d{4})\s*-\s*(\d{4})" | |
Dim Matches, Match | |
Dim originalSelection As Range |
Change "print" to "putc" circa line 316 in autotest.rb
This will break if you're using UTF accented characters.
See the following...