Skip Menu |

This queue is for tickets about the Inline-Ruby CPAN distribution.

Report information
The Basics
Id: 127896
Status: new
Priority: 0/
Queue: Inline-Ruby

People
Owner: Nobody in particular
Requestors: hermit [...] acm.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: can't load files with magic 'coding: binary' comment
From: hermit [...] acm.org
Files with the magic comment "# coding: binary" (as well as other encodings) can't be loaded by "require". This seems to be because Init_enc() in ruby is never called. It would be called if Ruby.xs called ruby_options(), as is done in Ruby's main.c. At least one file included with Ruby (openssl/buffering.rb) uses this encoding, and because of this, use Inline 'Ruby' => 'require "rails"'; fails with #<ArgumentError: unknown encoding name: binary>
If I do use Inline 'Ruby' => 'require "enc/encdb.so"'; first, it gets past the error and seems to grok binary encoding. The actual Init_enc() function in Ruby is not extern, and it does a little bit more than that (it's in "dmyenc.c").