Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Can't compile using rbx with -X19 #1939

nanaya opened this Issue Oct 3, 2012 · 2 comments


None yet
2 participants

nanaya commented Oct 3, 2012

Using installed rbx with RBXOPT=-X19 environment causes compilation of rubinius to fail.


  1. install rubinius (say $HOME/app/rbx20)
  2. add $HOME/app/rbx20/bin to PATH environment so rbx, ruby, and rake uses that one
  3. clone clean rubinius source
  4. build it

Result: http://pastebin.com/raw.php?i=whkdYQwb

Using same rbx but with RBXOPT=-X18 (or unset) doesn't cause this problem.

[edho@yutsuki rubinius]$ uname -a
Linux yutsuki 3.2.0-31-generic-pae #50-Ubuntu SMP Fri Sep 7 16:39:45 UTC 2012 i686 i686 i386 GNU/Linux
[edho@yutsuki rubinius]$ rbx --version
rubinius 2.0.0dev (1.9.3 32c35a4f yyyy-mm-dd JI) [i686-pc-linux-gnu]
[edho@yutsuki rubinius]$ llvm-config --version

brixen commented Oct 3, 2012

IO.readlines is not ready for options Hash in 1.9 mode. Also, there are no RubySpecs for this behavior. Would you like to help us write some?

nanaya commented Oct 4, 2012

Something like this? (hypothetical, untested, ugly, etc)

require File.expand_path('../../../spec_helper', __FILE__)

describe "IO#readlines" do
  before :each do
    @fname = "test.txt"
    @contents = "1234567890"

    File.open(@fname, "w") {|io| io.write @contents }

  after :each do
    File.delete(@fname) if File.exists?(@fname)

  ruby_version_is "1.9" do
    it "accepts encoding parameter" do
      orig_exteenc = Encoding.external_encoding
      Encoding.external_encoding = Encoding::UTF-8
      IO.readlines(@fname, encoding: 'ascii-8bit')[0].encoding.should == Encoding::ASCII_8BIT
      Encoding.external_encoding = orig_exteenc

@brixen brixen closed this in 9c168e9 Nov 9, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment