mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* tool/rbinstall.rb (Gem::Specification): may not be defined when
cross-compiling and BASERUBY is 1.8. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32841 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
11667b9c9a
commit
f555a533d0
2 changed files with 26 additions and 0 deletions
|
|
@ -1,3 +1,8 @@
|
|||
Thu Aug 4 15:44:10 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* tool/rbinstall.rb (Gem::Specification): may not be defined when
|
||||
cross-compiling and BASERUBY is 1.8.
|
||||
|
||||
Thu Aug 4 11:30:36 2011 NARUSE, Yui <naruse@ruby-lang.org>
|
||||
|
||||
* include/ruby/missing.h: define __syscall on OpenBSD as r32702.
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ require 'fileutils'
|
|||
require 'shellwords'
|
||||
require 'optparse'
|
||||
require 'optparse/shellwords'
|
||||
require 'ostruct'
|
||||
|
||||
STDOUT.sync = true
|
||||
File.umask(0)
|
||||
|
|
@ -533,6 +534,26 @@ install?(:local, :comm, :man) do
|
|||
end
|
||||
|
||||
# :stopdoc:
|
||||
module Gem
|
||||
if defined?(Specification)
|
||||
remove_const(:Specification)
|
||||
end
|
||||
|
||||
class Specification < OpenStruct
|
||||
def initialize(*)
|
||||
super
|
||||
yield(self) if defined?(yield)
|
||||
self.executables ||= []
|
||||
end
|
||||
|
||||
def self.load(path)
|
||||
src = File.open(path, "rb") {|f| f.read}
|
||||
src.sub!(/\A#.*/, '')
|
||||
eval(src, nil, path)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
module RbInstall
|
||||
module Specs
|
||||
class Reader < Struct.new(:name, :src, :execs)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue