Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Another MacRuby issue #2

Open
stevenbedrick opened this Issue · 1 comment

2 participants

@stevenbedrick

bibtex-ruby seems to have an issue with the latest nightlies of MacRuby. The following test program:

require 'rubygems'
require 'bibtex'
bib = BibTeX.open('./test2.bib')
puts bib.entries.size

Runs just fine under MRI, and ran just fine under earlier versions of post-0.8 MacRuby, but under the latest MacRuby nightlies, I get the following runtime error:

bibtex-ruby-1.2.0/lib/bibtex/extensions.rb:28:in `block': uninitialized constant Array::StringReplacement (NameError)

The full stack trace is shown in this gist:

https://gist.github.com/844817

Note that a) test2.bib is a minimal file containing only one entry, and b) that bibtex-ruby seems to take an awfully long time to crash under MacRuby.

Actually, in general, bibtex-ruby's performance under MacRuby is orders of magnitude worse than under MRI, but I don't know if that's anything you have control over- it's probably got more to do with RACC under MacRuby than anything else.

@inukshuk
Owner

The constant lookup seems to fail here. I've made the paths explicit so you could try to pull the latest version of lib/bibtex/extensions.rb and copy it to

Users/steven/.rvm/gems/macruby-nightly/gems/bibtex-ruby-1.2.0/lib/bibtex/extensions.rb

The least this should accomplish is to move us past the failed name resolution; however, it does not address any performance issues. Most of the work is done by the lexer (which uses StringScanner extensively) and the racc-generated parser, so I would expect either of those to be the culprit. Do you know if racc works under MacRuby at all?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.