rails and jruby + require 'jcode' problem
-----------------------------------------

                 Key: JRUBY-2964
                 URL: http://jira.codehaus.org/browse/JRUBY-2964
             Project: JRuby
          Issue Type: Bug
    Affects Versions: JRuby 1.1.4
         Environment: using ubuntu 8.04

            Reporter: khaled al habache
            Assignee: Thomas E Enebo
         Attachments: pastie-263899.rb

###############################################################
#a simple rails controller , rails 2.0.2 and jruby 1.1.4
###############################################################

class TesterController < ApplicationController
  require 'jcode'
   def index(len=8)
    chars = ("a".."z").to_a + ("A".."Z").to_a + ("0".."9").to_a
    guid = ""
    1.upto(len) { |i| guid << chars[rand(chars.size-1)] }
    render :text => guid
  end
end



###############################################################
#am using jruby 1.1.4
#and am getting this error when i do require 'jcode' in line 2,
#but when removing it things goes ok....
#too short multibyte code string: 
#/[\xc0-\xdf][\x80-\xbf]|[\xe0-\xef][\x80-\xbf][\x80-\xbf]$/
#/home/khelll/projects/jruby/lib/ruby/1.8/jcode.rb:66:in `end_regexp'
#/home/khelll/projects/jruby/lib/ruby/1.8/jcode.rb:79:in `succ!'
#/home/khelll/projects/jruby/lib/ruby/1.8/jcode.rb:94:in `succ'
#app/controllers/tester_controller.rb:4:in `each'
#app/controllers/tester_controller.rb:4:in `index'
#:1:in `initialize'
###############################################################



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to