Browse files

Merge branch 'master' into 2.0.testing

  • Loading branch information...
2 parents fca72fd + cf388af commit 27509446430f53e1c10293339170bf11a5d6db2f @dbussink dbussink committed Nov 23, 2011
Showing with 38,343 additions and 353 deletions.
  1. +1 −1 Rakefile
  2. +160 −42 configure
  3. +5 −0 kernel/bootstrap/basicobject.rb
  4. +0 −1 kernel/bootstrap/load_order19.txt
  5. +0 −4 kernel/bootstrap/object19.rb
  6. +10 −0 kernel/bootstrap/variable_scope.rb
  7. +2 −2 kernel/common/array.rb
  8. +0 −3 kernel/common/basicobject.rb
  9. +35 −9 kernel/common/capi.rb
  10. +2 −0 kernel/common/chararray19.rb
  11. +4 −0 kernel/common/compiled_method.rb
  12. +7 −7 kernel/common/complex.rb
  13. +5 −2 kernel/common/eval.rb
  14. +5 −0 kernel/common/eval18.rb
  15. +4 −0 kernel/common/eval19.rb
  16. +4 −0 kernel/common/float.rb
  17. +9 −0 kernel/common/float19.rb
  18. +0 −30 kernel/common/integer.rb
  19. +5 −0 kernel/common/io19.rb
  20. +3 −1 kernel/common/kernel.rb
  21. +1 −1 kernel/common/marshal.rb
  22. +4 −0 kernel/common/nil19.rb
  23. +2 −2 kernel/common/struct.rb
  24. +1 −1 kernel/common/thread.rb
  25. +1 −1 kernel/common/time.rb
  26. +7 −1 kernel/common/time19.rb
  27. +4 −0 kernel/delta/rubinius.rb
  28. +1 −1 kernel/delta/ruby_constants19.rb
  29. +28 −4 kernel/delta/struct.rb
  30. +24 −1 kernel/loader.rb
  31. +1 −0 kernel/platform/math.rb
  32. +1 −0 lib/18/bigdecimal.rb
  33. 0 lib/{ext → 18}/bigdecimal/README
  34. 0 lib/{ext → 18}/bigdecimal/bigdecimal_en.html
  35. 0 lib/{ext → 18}/bigdecimal/bigdecimal_ja.html
  36. 0 lib/{ext/bigdecimal → 18/bigdecimal/ext}/Rakefile
  37. 0 lib/{ext/bigdecimal → 18/bigdecimal/ext}/bigdecimal.c
  38. 0 lib/{ext/bigdecimal → 18/bigdecimal/ext}/bigdecimal.h
  39. 0 lib/{ → 18}/bigdecimal/jacobian.rb
  40. 0 lib/{ → 18}/bigdecimal/ludcmp.rb
  41. 0 lib/{ → 18}/bigdecimal/math.rb
  42. 0 lib/{ → 18}/bigdecimal/newton.rb
  43. 0 lib/{ext → 18}/bigdecimal/sample/linear.rb
  44. 0 lib/{ext → 18}/bigdecimal/sample/nlsolve.rb
  45. 0 lib/{ext → 18}/bigdecimal/sample/pi.rb
  46. 0 lib/{ → 18}/bigdecimal/util.rb
  47. +75 −1 lib/18/date.rb
  48. +1 −1 lib/18/dl.rb
  49. 0 lib/{ext/dl → 18/dl/ext}/.gitignore
  50. 0 lib/{ext/dl → 18/dl/ext}/depend
  51. 0 lib/{ext/dl → 18/dl/ext}/dl.c
  52. 0 lib/{ext/dl → 18/dl/ext}/dl.def
  53. 0 lib/{ext/dl → 18/dl/ext}/dl.h
  54. 0 lib/{ext/dl → 18/dl/ext}/doc/dl.txt
  55. 0 lib/{ext/dl → 18/dl/ext}/extconf.rb
  56. 0 lib/{ext/dl → 18/dl/ext}/h2rb
  57. 0 lib/{ext/dl → 18/dl/ext}/handle.c
  58. 0 lib/{ext/dl → 18/dl/ext}/install.rb
  59. 0 lib/{ext/dl → 18/dl/ext}/lib/dl/import.rb
  60. 0 lib/{ext/dl → 18/dl/ext}/lib/dl/struct.rb
  61. 0 lib/{ext/dl → 18/dl/ext}/lib/dl/types.rb
  62. 0 lib/{ext/dl → 18/dl/ext}/lib/dl/win32.rb
  63. 0 lib/{ext/dl → 18/dl/ext}/mkcall.rb
  64. 0 lib/{ext/dl → 18/dl/ext}/mkcallback.rb
  65. 0 lib/{ext/dl → 18/dl/ext}/mkcbtable.rb
  66. +0 −1 lib/{ext/dl → 18/dl/ext}/ptr.c
  67. 0 lib/{ext/dl → 18/dl/ext}/sample/c++sample.C
  68. 0 lib/{ext/dl → 18/dl/ext}/sample/c++sample.rb
  69. 0 lib/{ext/dl → 18/dl/ext}/sample/drives.rb
  70. 0 lib/{ext/dl → 18/dl/ext}/sample/getch.rb
  71. 0 lib/{ext/dl → 18/dl/ext}/sample/libc.rb
  72. 0 lib/{ext/dl → 18/dl/ext}/sample/msgbox.rb
  73. 0 lib/{ext/dl → 18/dl/ext}/sample/msgbox2.rb
  74. 0 lib/{ext/dl → 18/dl/ext}/sample/stream.rb
  75. 0 lib/{ext/dl → 18/dl/ext}/sym.c
  76. 0 lib/{ext/dl → 18/dl/ext}/test/libtest.def
  77. 0 lib/{ext/dl → 18/dl/ext}/test/test.c
  78. 0 lib/{ext/dl → 18/dl/ext}/test/test.rb
  79. 0 lib/{ext/dl → 18/dl/ext}/type.rb
  80. 0 lib/{ → 18}/expect.rb
  81. +1 −1 lib/{ → 18}/kconv.rb
  82. +1 −0 lib/18/nkf.rb
  83. 0 lib/{ext/nkf → 18/nkf/ext}/Rakefile
  84. 0 lib/{ext/nkf → 18/nkf/ext}/nkf-utf8/config.h
  85. 0 lib/{ext/nkf → 18/nkf/ext}/nkf-utf8/nkf.c
  86. 0 lib/{ext/nkf → 18/nkf/ext}/nkf-utf8/utf8tbl.c
  87. 0 lib/{ext/nkf → 18/nkf/ext}/nkf-utf8/utf8tbl.h
  88. 0 lib/{ext/nkf → 18/nkf/ext}/nkf.c
  89. 0 lib/{ext/syck → 18/syck/ext}/Rakefile
  90. 0 lib/{ext/syck → 18/syck/ext}/bytecode.c
  91. 0 lib/{ext/syck → 18/syck/ext}/depend
  92. 0 lib/{ext/syck → 18/syck/ext}/emitter.c
  93. 0 lib/{ext/syck → 18/syck/ext}/extconf.rb
  94. 0 lib/{ext/syck → 18/syck/ext}/gram.c
  95. 0 lib/{ext/syck → 18/syck/ext}/gram.h
  96. 0 lib/{ext/syck → 18/syck/ext}/handler.c
  97. 0 lib/{ext/syck → 18/syck/ext}/implicit.c
  98. 0 lib/{ext/syck → 18/syck/ext}/node.c
  99. 0 lib/{ext/syck → 18/syck/ext}/rubyext.c
  100. 0 lib/{ext/syck → 18/syck/ext}/st.c
  101. 0 lib/{ext/syck → 18/syck/ext}/st.h
  102. 0 lib/{ext/syck → 18/syck/ext}/syck.c
  103. 0 lib/{ext/syck → 18/syck/ext}/syck.h
  104. 0 lib/{ext/syck → 18/syck/ext}/token.c
  105. 0 lib/{ext/syck → 18/syck/ext}/yaml2byte.c
  106. 0 lib/{ext/syck → 18/syck/ext}/yamlbyte.h
  107. 0 lib/{ → 18}/yaml.rb
  108. 0 lib/{ → 18}/yaml/baseemitter.rb
  109. 0 lib/{ → 18}/yaml/basenode.rb
  110. 0 lib/{ → 18}/yaml/constants.rb
  111. 0 lib/{ → 18}/yaml/dbm.rb
  112. 0 lib/{ → 18}/yaml/encoding.rb
  113. 0 lib/{ → 18}/yaml/error.rb
  114. 0 lib/{ → 18}/yaml/loader.rb
  115. 0 lib/{ → 18}/yaml/rubytypes.rb
  116. 0 lib/{ → 18}/yaml/store.rb
  117. 0 lib/{ → 18}/yaml/stream.rb
  118. 0 lib/{ → 18}/yaml/stringio.rb
  119. +1 −1 lib/{ → 18}/yaml/syck.rb
  120. 0 lib/{ → 18}/yaml/tag.rb
  121. 0 lib/{ → 18}/yaml/types.rb
  122. 0 lib/{ → 18}/yaml/yamlnode.rb
  123. 0 lib/{ → 18}/yaml/ypath.rb
  124. +1 −0 lib/19/bigdecimal.rb
  125. +2 −0 lib/19/bigdecimal/.gitignore
  126. +60 −0 lib/19/bigdecimal/README
  127. +792 −0 lib/19/bigdecimal/bigdecimal_en.html
  128. +799 −0 lib/19/bigdecimal/bigdecimal_ja.html
  129. +5,880 −0 lib/19/bigdecimal/ext/bigdecimal.c
  130. +274 −0 lib/19/bigdecimal/ext/bigdecimal.h
  131. +6 −0 lib/19/bigdecimal/ext/extconf.rb
  132. +87 −0 lib/19/bigdecimal/jacobian.rb
  133. +88 −0 lib/19/bigdecimal/ludcmp.rb
  134. +206 −0 lib/19/bigdecimal/math.rb
  135. +78 −0 lib/19/bigdecimal/newton.rb
  136. +71 −0 lib/19/bigdecimal/sample/linear.rb
  137. +38 −0 lib/19/bigdecimal/sample/nlsolve.rb
  138. +20 −0 lib/19/bigdecimal/sample/pi.rb
  139. +109 −0 lib/19/bigdecimal/util.rb
  140. +53 −37 lib/19/date/format.rb
  141. +51 −0 lib/19/expect.rb
  142. +282 −0 lib/19/kconv.rb
  143. +315 −94 lib/19/mkmf.rb
  144. +1 −0 lib/19/nkf.rb
  145. +2 −0 lib/19/nkf/.gitignore
  146. +2 −0 lib/19/nkf/ext/extconf.rb
  147. +51 −0 lib/19/nkf/ext/nkf-utf8/config.h
  148. +6,717 −0 lib/19/nkf/ext/nkf-utf8/nkf.c
  149. +192 −0 lib/19/nkf/ext/nkf-utf8/nkf.h
  150. +8,754 −0 lib/19/nkf/ext/nkf-utf8/utf8tbl.c
  151. +61 −0 lib/19/nkf/ext/nkf-utf8/utf8tbl.h
  152. +502 −0 lib/19/nkf/ext/nkf.c
  153. +68 −62 lib/19/open-uri.rb
  154. +126 −27 lib/19/ostruct.rb
  155. +263 −0 lib/19/psych.rb
  156. +2 −0 lib/19/psych/.gitignore
  157. +94 −0 lib/19/psych/coder.rb
  158. +40 −0 lib/19/psych/core_ext.rb
  159. +83 −0 lib/19/psych/deprecated.rb
  160. +412 −0 lib/19/psych/ext/emitter.c
  161. +8 −0 lib/19/psych/ext/emitter.h
  162. +16 −0 lib/19/psych/ext/extconf.rb
  163. +341 −0 lib/19/psych/ext/parser.c
  164. +6 −0 lib/19/psych/ext/parser.h
  165. +34 −0 lib/19/psych/ext/psych.c
  166. +20 −0 lib/19/psych/ext/psych.h
  167. +41 −0 lib/19/psych/ext/to_ruby.c
  168. +8 −0 lib/19/psych/ext/to_ruby.h
  169. +24 −0 lib/19/psych/ext/yaml_tree.c
  170. +8 −0 lib/19/psych/ext/yaml_tree.h
  171. +221 −0 lib/19/psych/handler.rb
  172. +6 −0 lib/19/psych/json.rb
  173. +19 −0 lib/19/psych/json/ruby_events.rb
  174. +15 −0 lib/19/psych/json/stream.rb
  175. +12 −0 lib/19/psych/json/tree_builder.rb
  176. +29 −0 lib/19/psych/json/yaml_events.rb
  177. +77 −0 lib/19/psych/nodes.rb
  178. +18 −0 lib/19/psych/nodes/alias.rb
  179. +60 −0 lib/19/psych/nodes/document.rb
  180. +56 −0 lib/19/psych/nodes/mapping.rb
  181. +52 −0 lib/19/psych/nodes/node.rb
  182. +67 −0 lib/19/psych/nodes/scalar.rb
  183. +81 −0 lib/19/psych/nodes/sequence.rb
  184. +37 −0 lib/19/psych/nodes/stream.rb
  185. +4 −0 lib/19/psych/omap.rb
  186. +47 −0 lib/19/psych/parser.rb
  187. +105 −0 lib/19/psych/scalar_scanner.rb
  188. +4 −0 lib/19/psych/set.rb
  189. +36 −0 lib/19/psych/stream.rb
  190. +22 −0 lib/19/psych/streaming.rb
  191. +94 −0 lib/19/psych/tree_builder.rb
  192. +6 −0 lib/19/psych/visitors.rb
  193. +26 −0 lib/19/psych/visitors/depth_first.rb
  194. +44 −0 lib/19/psych/visitors/emitter.rb
  195. +21 −0 lib/19/psych/visitors/json_tree.rb
  196. +277 −0 lib/19/psych/visitors/to_ruby.rb
  197. +19 −0 lib/19/psych/visitors/visitor.rb
  198. +382 −0 lib/19/psych/visitors/yaml_tree.rb
  199. +13 −13 lib/19/securerandom.rb
  200. +3 −1 lib/19/stringio.rb
  201. +447 −0 lib/19/syck.rb
  202. +2 −0 lib/19/syck/.gitignore
  203. +242 −0 lib/19/syck/baseemitter.rb
  204. +222 −0 lib/19/syck/basenode.rb
  205. +45 −0 lib/19/syck/constants.rb
  206. +35 −0 lib/19/syck/encoding.rb
  207. +34 −0 lib/19/syck/error.rb
  208. +1,165 −0 lib/19/syck/ext/bytecode.c
  209. +1,247 −0 lib/19/syck/ext/emitter.c
  210. +5 −0 lib/19/syck/ext/extconf.rb
  211. +1,894 −0 lib/19/syck/ext/gram.c
  212. +79 −0 lib/19/syck/ext/gram.h
  213. +173 −0 lib/19/syck/ext/handler.c
  214. +2,990 −0 lib/19/syck/ext/implicit.c
  215. +407 −0 lib/19/syck/ext/node.c
Sorry, we could not display the entire diff because too many files (1,010) changed.
View
2 Rakefile
@@ -33,7 +33,7 @@ end
require config_rb
BUILD_CONFIG = Rubinius::BUILD_CONFIG
-unless BUILD_CONFIG[:config_version] == 140
+unless BUILD_CONFIG[:config_version] == 147
STDERR.puts "Your configuration is outdated, please run ./configure first"
exit 1
end
View
202 configure
@@ -25,7 +25,7 @@ class Configure
/([^-]+)-([^-]+)-(.*)/ =~ @host
@cpu, @vendor, @os = $1, $2, $3
@little_endian = false
- @sizeof_long = 0
+ @sizeof = {}
# TODO: For better cross-compiling support, it may be necessary to
# use the feature facility to check for a define in the compiler.
@@ -96,7 +96,6 @@ class Configure
@runtime = @libdir + "/runtime"
@kernel_path = @libdir + "/kernel"
@lib_path = @libdir + "/lib"
- @ext_path = @libdir + "/lib/ext"
@mandir = root + "/man"
@gemsdir = root + "/gems"
@@ -109,12 +108,13 @@ class Configure
# Library configuration
@rb_readline = false
@vendor_zlib = false
+ @libyaml = false
# Essential settings (modify these for creating releases)
@libversion = "2.0"
@version = "#{@libversion}.0dev"
@release_date = "yyyy-mm-dd"
- @config_version = 140
+ @config_version = 147
# TODO: add conditionals for platforms
if RbConfig::CONFIG["build_os"] =~ /darwin/
@@ -179,14 +179,12 @@ class Configure
o.on "--default-version", "VERSION", "Enable Ruby VERSION as the default" do |v|
version = normalize_versions v
if version.size > 1
- @log.error "Only one version can be default, given: #{version.inspect}"
- failure
+ failure "Only one version can be default, given: #{version.inspect}."
end
@default_version = version.first
unless @version_list.include? @default_version
- @log.error "Requested default version #{@default_version} is not enabled."
- failure
+ failure "Requested default version #{@default_version} is not enabled."
end
end
@@ -262,7 +260,6 @@ class Configure
@runtime = @libdir + "/runtime"
@kernel_path = @libdir + "/kernel"
@lib_path = @libdir + "/lib"
- @ext_path = @libdir + "/lib/ext"
@mandir = dir + "/man"
@gemsdir = dir + "/gems"
@@ -289,7 +286,6 @@ class Configure
@runtime = @libdir + "/runtime"
@kernel_path = @libdir + "/kernel"
@lib_path = @libdir + "/lib"
- @ext_path = @libdir + "/lib/ext"
@sitedir = @libdir + "/site"
@vendordir = @libdir + "/vendor"
@@ -326,6 +322,7 @@ class Configure
feature "C-readline", true
feature "ruby-readline", false
feature "vendor-zlib", !!@windows
+ feature "alloc-tracking", false
o.doc "\n Help!"
@@ -364,10 +361,9 @@ class Configure
versions = str.gsub(/[^\d,]/, "").split(',')
versions.each do |ver|
unless @supported_versions.include? ver
- @log.error <<-EOM
+ failure <<-EOM
Unsupported language version requested: #{ver}. Options are #{@supported_versions.join(", ")}
EOM
- failure
end
end
versions
@@ -579,8 +575,7 @@ Unsupported language version requested: #{ver}. Options are #{@supported_version
def remove_default
if File.exists?(File.join(@llvm_default, "Makefile.common"))
- @log.error "ABORT: Unwilling to override custom LLVM tree, please update it manually"
- failure
+ failure "ABORT: Unwilling to override custom LLVM tree, please update it manually."
else
@log.write " Removing outdated tree..."
FileUtils.rm_rf(@llvm_default)
@@ -617,8 +612,7 @@ Unsupported language version requested: #{ver}. Options are #{@supported_version
# If they explicitly said where LLVM is, use that and fail hard.
if @llvm_path
unless setup_path
- @log.error "ABORT: Path '#{@llvm_path}' not a proper LLVM path"
- failure
+ failure "ABORT: Path '#{@llvm_path}' not a proper LLVM path."
end
return
@@ -692,8 +686,11 @@ Unsupported language version requested: #{ver}. Options are #{@supported_version
libs
end
- def failure
- puts "\n'configure' has failed. Please check configure.log for more details."
+ def failure(message=nil)
+ message ||= "'configure' has failed."
+ @log.error message
+
+ STDERR.puts "\n#{message} Please check configure.log for more details."
exit 1
end
@@ -713,8 +710,7 @@ Unsupported language version requested: #{ver}. Options are #{@supported_version
return $?.exitstatus unless run
unless $?.exitstatus == 0
- @log.error "compiling configure test program failed"
- failure
+ failure "Compiling configure test program failed."
end
system expand("./#{basename}")
@@ -724,16 +720,44 @@ Unsupported language version requested: #{ver}. Options are #{@supported_version
end
end
- def detect_sizeof_long
- @log.print "Checking sizeof(long): "
+ def write_have_defines(f)
+ @sizeof.keys.sort.each { |k| f.puts "#define HAVE_#{k}".ljust(30) + "1" }
+ end
+
+ def write_sizeof_defines(f)
+ @sizeof.keys.sort.each { |k| f.puts "#define SIZEOF_#{k}".ljust(30) + @sizeof[k].to_s }
+ end
+
+ def sizeof_typename(type)
+ if type =~ /(\*+)$/
+ name = "#{type[0...-$1.size]}#{"p" * $1.size}"
+ else
+ name = type
+ end
+ name.gsub(/\W/, "_").upcase
+ end
+
+ def sizeof(type)
+ @sizeof[sizeof_typename(type)] or failure("Unknown type: '#{type}'.")
+ end
+
+ def detect_sizeof(type, includes=[])
+ @log.print "Checking sizeof(#{type}): "
- @sizeof_long = check_program do |f|
- src = "int main() { return sizeof(long); }"
+ size = check_program do |f|
+ src = includes.map { |include| "#include <#{include}>" }.join("\n")
+ src += <<-EOP
+#include <stddef.h>
+
+int main() { return sizeof(#{type}); }
+ EOP
f.puts src
@log.log src
end
- @log.write "#{@sizeof_long} bytes"
+ @sizeof[sizeof_typename(type)] = size
+
+ @log.write "#{size} bytes"
end
def detect_endian
@@ -774,7 +798,7 @@ int main() { X x; return 0; }
@x86_32 = false
- if @sizeof_long == 4
+ if sizeof("long") == 4
status = check_program do |f|
src = <<-EOP
int main() {
@@ -820,6 +844,64 @@ int main() { return tgetnum(""); }
@log.write @curses ? @curses : "not found"
end
+ def has_struct_member(struct, member, includes = [])
+ @log.print "Checking whether struct #{struct} has member #{member}: "
+ tf = Tempfile.new("rbx-test")
+ includes.each do |i|
+ src = "#include <#{i}>"
+ tf.puts src
+ @log.log src
+ end
+
+ src = "int main() { struct #{struct} st; st.#{member}; }"
+ tf.puts src
+ @log.log src
+
+ tf.close
+
+ system "#{@cxx} -S -o - -x c #{c_includes} #{env('CFLAGS')} #{tf.path} >>#{@log.path} 2>&1"
+ status = ($?.exitstatus == 0)
+
+ tf.unlink
+
+ if status
+ @log.write "found!"
+ else
+ @log.write "not found."
+ end
+
+ return status
+ end
+
+ def has_global(name, includes=[])
+ @log.print "Checking for global '#{name}': "
+ tf = Tempfile.new("rbx-test")
+ includes.each do |i|
+ src = "#include <#{i}>"
+ tf.puts src
+ @log.log src
+ end
+
+ src = "int main() { #{name}; }"
+ tf.puts src
+ @log.log src
+
+ tf.close
+
+ system "#{@cxx} -S -o - -x c #{c_includes} #{env('CFLAGS')} #{tf.path} >>#{@log.path} 2>&1"
+ status = ($?.exitstatus == 0)
+
+ tf.unlink
+
+ if status
+ @log.write "found!"
+ else
+ @log.write "not found."
+ end
+
+ return status
+ end
+
def has_function(name, includes=[])
@log.print "Checking for function '#{name}': "
tf = Tempfile.new("rbx-test")
@@ -854,6 +936,10 @@ int main() { return tgetnum(""); }
@defines << "HAS_EXECINFO"
end
+ if @features["alloc-tracking"]
+ @defines << "RBX_ALLOC_TRACKING"
+ end
+
if @features["C-readline"] and
(has_function("readline", ["stdio.h", "stdlib.h", "readline/readline.h"]) or
has_function("readline", ["stdio.h", "stdlib.h", "editline/readline.h"]))
@@ -862,6 +948,30 @@ int main() { return tgetnum(""); }
@rb_readline = true
end
+ if has_function("yaml_parser_initialize", ["yaml.h"])
+ @libyaml = true
+ end
+
+ if has_struct_member("tm", "tm_gmtoff", ["time.h"])
+ @defines << "HAVE_TM_GMTOFF"
+ end
+
+ if has_struct_member("tm", "tm_zone", ["time.h"])
+ @defines << "HAVE_TM_ZONE"
+ end
+
+ if has_global("timezone", ["time.h"])
+ @defines << "HAVE_TIMEZONE"
+ end
+
+ if has_global("tzname", ["time.h"])
+ @defines << "HAVE_TZNAME"
+ end
+
+ if has_global("daylight", ["time.h"])
+ @defines << "HAVE_DAYLIGHT"
+ end
+
@vendor_zlib = true if @features["vendor-zlib"]
end
@@ -875,7 +985,17 @@ int main() { return tgetnum(""); }
@log.write ""
- detect_sizeof_long
+ detect_sizeof("short")
+ detect_sizeof("int")
+ detect_sizeof("void*")
+ detect_sizeof("size_t")
+ detect_sizeof("long")
+ detect_sizeof("long long")
+ detect_sizeof("float")
+ detect_sizeof("double")
+ detect_sizeof("off_t", ["unistd.h"])
+ detect_sizeof("time_t", ["time.h"])
+
detect_endian
detect_tr1_hash
detect_x86_32bit
@@ -928,14 +1048,11 @@ int main() { return tgetnum(""); }
if $?.exitstatus == 0
v = output.scan(regexp)[0].map(&:to_i)
unless (v <=> version) >= 0
- msg = " Expected #{tool_name} version >= #{version.join('.')}, found #{v.join('.')}"
- @log.error msg
- failure
+ failure " Expected #{tool_name} version >= #{version.join('.')}, found #{v.join('.')}"
end
@log.write " found"
else
- @log.error " not found"
- failure
+ failure "#{tool_name} not found."
end
end
@@ -969,14 +1086,13 @@ module Rubinius
:vendor => "#{@vendor}",
:os => "#{@os}",
:little_endian => #{@little_endian},
- :sizeof_long => #{@sizeof_long},
+ :sizeof_long => #{sizeof("long")},
:x86_32 => #{@x86_32},
:bindir => "#{@bindir}",
:libdir => "#{@libdir}",
:runtime => "#{@runtime}",
:kernel_path => "#{@kernel_path}",
:lib_path => "#{@lib_path}",
- :ext_path => "#{@ext_path}",
:include18dir => "#{@include18dir}",
:include19dir => "#{@include19dir}",
:include20dir => "#{@include20dir}",
@@ -996,7 +1112,8 @@ module Rubinius
:version_list => #{@version_list.inspect},
:default_version => "#{@default_version}",
:vendor_zlib => #{@vendor_zlib},
- :readline => :#{@rb_readline ? :rb_readline : :c_readline}
+ :readline => :#{@rb_readline ? :rb_readline : :c_readline},
+ :libyaml => #{@libyaml}
}
end
EOC
@@ -1019,7 +1136,6 @@ end
#define RBX_RUNTIME "#{@runtime}"
#define RBX_KERNEL_PATH "#{@kernel_path}"
#define RBX_LIB_PATH "#{@lib_path}"
-#define RBX_EXT_PATH "#{@ext_path}"
#define RBX_HDR18_PATH "#{@include18dir}"
#define RBX_HDR19_PATH "#{@include19dir}"
#define RBX_HDR20_PATH "#{@include20dir}"
@@ -1029,7 +1145,7 @@ end
#define RBX_LIB_VERSION "#{@libversion}"
#define RBX_LDSHARED "#{@ldshared}"
#define RBX_RELEASE_DATE "#{@release_date}"
-#define RBX_SIZEOF_LONG #{@sizeof_long}
+#define RBX_SIZEOF_LONG #{sizeof("long")}
#define RBX_LLVM_API_VER #{@llvm_api_version}
EOC
@@ -1074,7 +1190,6 @@ end
#define RBX_RUNTIME "#{@runtime}"
#define RBX_KERNEL_PATH "#{@kernel_path}"
#define RBX_LIB_PATH "#{@lib_path}"
-#define RBX_EXT_PATH "#{@ext_path}"
#define RBX_HDR18_PATH "#{@include18dir}"
#define RBX_HDR19_PATH "#{@include19dir}"
#define RBX_HDR20_PATH "#{@include20dir}"
@@ -1084,7 +1199,7 @@ end
#define RBX_LIB_VERSION "#{@libversion}"
#define RBX_LDSHARED "#{@ldshared}"
#define RBX_RELEASE_DATE "#{@release_date}"
-#define RBX_SIZEOF_LONG #{@sizeof_long}
+#define RBX_SIZEOF_LONG #{sizeof("long")}
#define RBX_LLVM_API_VER #{@llvm_api_version}
EOC
@@ -1123,8 +1238,13 @@ end
#ifndef NORETURN
#define NORETURN(x) __attribute__ ((noreturn)) x
#endif
+
EOC
+ write_have_defines f
+ f.puts
+ write_sizeof_defines f
+
if @windows
f.puts "#define RBX_WINDOWS 1"
end
@@ -1168,8 +1288,7 @@ end
def run
unless which_ruby == :ruby or which_ruby == :rbx
- @log.error "Sorry, building Rubinius requires MRI or Rubinius"
- failure
+ failure "Sorry, building Rubinius requires MRI or Rubinius."
end
if File.exists? @config
@@ -1187,9 +1306,8 @@ end
if ENV['PATH'] =~ /#{@bindir}/
@log.error " * Remove '#{@bindir}' from your PATH."
end
- @log.error " * Use a Ruby executable other than '#{build_ruby}' to build."
- failure
+ failure " * Use a Ruby executable other than '#{build_ruby}' to build."
end
process
View
5 kernel/bootstrap/basicobject.rb
@@ -1,4 +1,9 @@
class BasicObject
+ def initialize
+ # do nothing
+ end
+ private :initialize
+
def equal?(other)
Rubinius.primitive :object_equal
raise PrimitiveFailure, "BasicObject#equal? primitive failed"
View
1 kernel/bootstrap/load_order19.txt
@@ -26,7 +26,6 @@ lookuptable.rbc
method_table.rbc
nil.rbc
object.rbc
-object19.rbc
proc.rbc
process.rbc
regexp.rbc
View
4 kernel/bootstrap/object19.rb
@@ -1,4 +0,0 @@
-class Object
- def initialize(*)
- end
-end
View
10 kernel/bootstrap/variable_scope.rb
@@ -10,6 +10,16 @@ def self.current
raise PrimitiveFailure, "Unable to get current VariableScope"
end
+ def self.synthesize(method, module_, parent, self_, block, locals)
+ Rubinius.primitive :variable_scope_synthesize
+ raise PrimitiveFailure, "Unable to create a new VariableScope object"
+ end
+
+ def set_local(slot, obj)
+ Rubinius.primitive :variable_scope_set_local
+ raise PrimitiveFailure, "Unable to set VariableScope locals"
+ end
+
def locals
Rubinius.primitive :variable_scope_locals
raise PrimitiveFailure, "Unable to get VariableScope locals"
View
4 kernel/common/array.rb
@@ -492,7 +492,7 @@ def delete_if(&block)
@total = pos - @start
- return self
+ self
end
# Passes each index of the Array to the given block
@@ -957,7 +957,7 @@ def rassoc(obj)
# invoked on subclasses. See #reject!
def reject(&block)
return to_enum(:reject) unless block_given?
- dup.reject!(&block) || self
+ dup.delete_if(&block)
end
# Equivalent to #delete_if except that returns nil if
View
3 kernel/common/basicobject.rb
@@ -12,7 +12,4 @@ def singleton_method_removed(name) end
def singleton_method_undefined(name) end
private :singleton_method_undefined
-
- def initialize(*args) end
- private :initialize
end
View
44 kernel/common/capi.rb
@@ -2,26 +2,52 @@ module Rubinius
# CAPI contains utility methods used by capi.
module CAPI
- # C-API method corresponding to rb_num_coerce_bin
- def self.rb_num_coerce_bin(x, y, op)
+ def self.coerce(x, y, error=false)
begin
- a, b = y.coerce x
+ ary = y.coerce x
rescue
- raise TypeError, "#{y.inspect} can't be coerced into #{x.class}"
+ if error
+ raise TypeError, "#{y.inspect} can't be coerced into #{x.class}"
+ else
+ return false
+ end
+ end
+
+ unless ary.kind_of? Array and ary.size == 2
+ if error
+ raise TypeError, "coerce must return [x, y]"
+ else
+ return false
+ end
end
+ return ary
+ end
+
+ # C-API method corresponding to rb_num_coerce_bin
+ def self.rb_num_coerce_bin(x, y, op)
+ a, b = coerce x, y, true
+
a.__send__ op, b
end
# C-API method corresponding to rb_num_coerce_cmp
def self.rb_num_coerce_cmp(x, y, op)
- begin
- a, b = y.coerce x
- rescue
- return nil
+ ary = coerce x, y
+
+ return ary.first.__send__ op, ary.last if ary
+ end
+
+ # C-API method corresponding to rb_num_coerce_relop
+ def self.rb_num_coerce_relop(x, y, op)
+ ary = coerce x, y, false
+
+ if ary
+ rel = ary.first.__send__ op, ary.last
+ return rel unless rel.equal? nil
end
- a.__send__ op, b
+ raise ArgumentError, "comparison of #{x.class} with #{y.class} failed"
end
def self.sprintf(format, args)
View
2 kernel/common/chararray19.rb
@@ -1,5 +1,7 @@
module Rubinius
class CharArray
+ attr_accessor :encoding
+
# TODO: encoding
def character_at_index(index)
"" << self[index]
View
4 kernel/common/compiled_method.rb
@@ -317,6 +317,10 @@ def is_block?
get_metadata(:for_block)
end
+ def for_eval?
+ get_metadata(:for_eval)
+ end
+
def describe
str = "method #{@name}: #{@total_args} arg(s), #{@required_args} required"
if @splat
View
14 kernel/common/complex.rb
@@ -251,7 +251,8 @@ def abs2
def arg
Math.atan2(@imag, @real)
end
- alias angle arg
+ alias_method :angle, :arg
+ alias_method :phase, :arg
#
# Returns the absolute value _and_ the argument.
@@ -311,12 +312,6 @@ def numerator
@imag.numerator*(cd/@imag.denominator))
end
- def rationalize(eps = nil)
- raise RangeError, "non-zero imaginary part" unless @imag.zero?
-
- Rational(@real, 1)
- end
-
def real?
false
end
@@ -342,6 +337,11 @@ def to_r
real.to_r
end
+ def rationalize(eps = nil)
+ raise RangeError, "can't' convert #{self} into Rational" unless !imag.kind_of?(Float) && imag == 0
+ real.rationalize(eps)
+ end
+
#
# Standard string representation of the complex number.
#
View
7 kernel/common/eval.rb
@@ -15,8 +15,11 @@ def local_variables
end
end
- # the names of dynamic locals is now handled by the compiler
- # and thusly local_names has them.
+ if dyn = scope.dynamic_locals
+ dyn.keys.each do |name|
+ locals << name.to_s unless locals.include?(name.to_s)
+ end
+ end
scope = scope.parent
end
View
5 kernel/common/eval18.rb
@@ -86,6 +86,11 @@ def instance_eval(string=nil, filename="(eval)", line=1, &prc)
def instance_exec(*args, &prc)
raise LocalJumpError, "Missing block" unless block_given?
+
+ if prc.kind_of? Proc::Method
+ return prc.bound_method.call(*args)
+ end
+
env = prc.block
static_scope = env.static_scope
View
4 kernel/common/eval19.rb
@@ -88,6 +88,10 @@ def instance_exec(*args, &prc)
raise LocalJumpError, "Missing block" unless block_given?
env = prc.block
+ if prc.kind_of? Proc::Method
+ return prc.bound_method.call(*args)
+ end
+
static_scope = env.static_scope
if ImmediateValue === self
static_scope = static_scope.using_disabled_scope
View
4 kernel/common/float.rb
@@ -21,6 +21,10 @@ def -@
raise PrimitiveFailure, "Float#-@ primitive failed"
end
+ def abs
+ FFI::Platform::Math.fabs(self)
+ end
+
def +(other)
Rubinius.primitive :float_add
b, a = math_coerce other
View
9 kernel/common/float19.rb
@@ -2,6 +2,8 @@ class Float
INFINITY = 1.0 / 0.0
NAN = 0.0 / 0.0
+ alias_method :magnitude, :abs
+
def imaginary
0
end
@@ -33,4 +35,11 @@ def to_r
(f * (RADIX ** e)).to_r
end
+
+ def arg
+ return self if nan?
+ super
+ end
+ alias_method :angle, :arg
+ alias_method :phase, :arg
end
View
30 kernel/common/integer.rb
@@ -65,36 +65,6 @@ def integer?
true
end
- ##
- # Returns the minimum number of bits required for integer in (signed int)
- # binary format
- #--
- # NOTE: rshift would probably be slightly more efficient but since i'm
- # probably going to use this to simplify the complex behavior of
- # ruby's << and >> it would defeat the purpose by creating a circular
- # dependency.
- #
- # TODO: convert algorithm to primitive so no circular dependency?
- #++
-
- def bits(int = self)
- num_bits = 1 # sign bit storage
-
- if int < 0
- int = ~int
-
- num_bits += 1
- int /= 2 # could use >> in primitive
- end
-
- while int != 0
- num_bits += 1
- int /= 2 # could use >> in primitive
- end
-
- num_bits
- end
-
# Returns true if int is an even number.
def even?
self & 1 == 0
View
5 kernel/common/io19.rb
@@ -2,6 +2,11 @@ class IO
attr_accessor :external
attr_accessor :internal
+ # In MRI, these are modules that are used to extend the exception every time
+ # an exception is raised.
+ class WaitReadable < Errno::EAGAIN; end
+ class WaitWritable < Errno::EAGAIN; end
+
def self.binread(file, *arg)
unless arg.size < 3
raise ArgumentError, "wrong number of arguments (#{1+arg.size} for 1..3)"
View
4 kernel/common/kernel.rb
@@ -242,8 +242,10 @@ def test(cmd, file1, file2=nil)
File.exist? file1
when ?f
File.file? file1
+ when ?l
+ File.symlink? file1
else
- false
+ raise NotImplementedError, "command ?#{cmd.chr} not implemented"
end
end
module_function :test
View
2 kernel/common/marshal.rb
@@ -970,7 +970,7 @@ def self.load(obj, prc = nil)
ms.construct
rescue NameError => e
- raise ArgumentError, e.message
+ raise ArgumentError, e.message, e
end
class << self
View
4 kernel/common/nil19.rb
@@ -6,4 +6,8 @@ def to_r
def rationalize(eps = nil)
to_r
end
+
+ def to_c
+ Complex(0)
+ end
end
View
4 kernel/common/struct.rb
@@ -76,7 +76,7 @@ def self.[](*args)
end
const_set :STRUCT_ATTRS, attrs
- specialize_initialize
+ _specialize attrs
end
Struct.const_set klass_name, klass if klass_name
@@ -88,7 +88,7 @@ def self.[](*args)
# Don't specialize any thing created in the kernel. We hook up
# better form of this in delta.
- def self.specialize_initialize
+ def self._specialize(attrs)
end
def self.make_struct(name, attrs)
View
2 kernel/common/thread.rb
@@ -95,7 +95,7 @@ def self.detect_outermost_recursion(obj, paired_obj=undefined, &block)
if rec[:__detect_outermost_recursion__]
if detect_recursion(obj, paired_obj, &block)
- raise InnerRecursionDetected.new
+ raise InnerRecursionDetected
end
false
else
View
2 kernel/common/time.rb
@@ -72,7 +72,7 @@ def self._load(data)
def _dump(limit = nil)
tm = decomposed(true)
- if (year & 0xffff) != year then
+ if (year & 0xffff) != year || year < 1900 then
raise ArgumentError, "year too big to marshal: #{year}"
end
View
8 kernel/common/time19.rb
@@ -8,6 +8,12 @@ def inspect
end
end
- alias_method :to_s, :inspect
+ alias_method :to_s, :inspect
+ # TODO: MRI uses struct timespec in 1.9
+ def nsec
+ 0
+ end
+
+ alias_method :tv_nsec, :nsec
end
View
4 kernel/delta/rubinius.rb
@@ -255,6 +255,10 @@ def self.compile_file(name)
Compiler.compile name
end
+ def self.allocation_site(obj)
+ obj.instance_variable_get("@__allocation_site__")
+ end
+
##
# API Status: official
#
View
2 kernel/delta/ruby_constants19.rb
@@ -1,2 +1,2 @@
-RUBY_VERSION = "1.9.2"
+RUBY_VERSION = "1.9.3"
RUBY_PATCHLEVEL = 0
View
32 kernel/delta/struct.rb
@@ -13,7 +13,7 @@ def initialize(utime=nil, stime=nil, cutime=nil, cstime=nil,
end
end
- def self.specialize_initialize
+ def self._specialize(attrs)
# Because people are crazy, they subclass Struct directly, ie.
# class Craptastic < Struct
#
@@ -29,9 +29,7 @@ def self.specialize_initialize
# the specialize if we're trying new Struct's directly from Struct itself,
# not a craptastic Struct subclass.
- return unless self.equal? Struct
-
- attrs = self::STRUCT_ATTRS
+ return unless superclass.equal? Struct
args = []
0.upto(attrs.size-1) do |i|
@@ -43,11 +41,37 @@ def self.specialize_initialize
assigns << "@#{attrs[i]} = a#{i}"
end
+ hashes = []
+ vars = []
+
+ 0.upto(attrs.size-1) do |i|
+ hashes << "@#{attrs[i]}.hash"
+ vars << "@#{attrs[i]}"
+ end
+
code = <<-CODE
def initialize(#{args.join(", ")})
#{assigns.join(';')}
self
end
+
+ def hash
+ hash = #{hashes.size}
+
+ return hash if Thread.detect_outermost_recursion(self) do
+ hash = hash ^ #{hashes.join(' ^ ')}
+ end
+
+ hash
+ end
+
+ def to_a
+ [#{vars.join(', ')}]
+ end
+
+ def length
+ #{vars.size}
+ end
CODE
begin
View
25 kernel/loader.rb
@@ -20,6 +20,9 @@ def initialize
@simple_options = false
@early_option_stop = false
+ @enable_gems = Rubinius.ruby19?
+ @load_gemfile = false
+
@gem_bin = File.join Rubinius::GEMS_PATH, "bin"
end
@@ -285,12 +288,22 @@ def options(argv=ARGV)
$DEBUG = true
end
+ if Rubinius.ruby19?
+ options.on "--disable-gems", "Do not automatically load rubygems on startup" do
+ @enable_gems = false
+ end
+ end
+
options.on "-e", "CODE", "Compile and execute CODE" do |code|
@run_irb = false
$0 = "(eval)"
@evals << code
end
+ options.on '-G', '--gemfile', 'Respect a Gemfile in the current path' do
+ @load_gemfile = true
+ end
+
options.on "-h", "--help", "Display this help" do
@run_irb = false
puts options
@@ -569,7 +582,16 @@ def agent
def rubygems
@stage = "loading Rubygems"
- require "rubygems" if Rubinius.ruby19?
+ require "rubygems" if @enable_gems
+ end
+
+ def gemfile
+ @stage = "loading Gemfile"
+
+ if @load_gemfile
+ require 'rubygems' unless @enable_gems
+ require 'bundler/setup'
+ end
end
# Require any -r arguments
@@ -775,6 +797,7 @@ def main
debugger
agent
rubygems
+ gemfile
requires
evals
script
View
1 kernel/platform/math.rb
@@ -4,6 +4,7 @@
module FFI::Platform::Math
extend FFI::Library
+ attach_function :fabs, [:double], :double
attach_function :atan2, [:double, :double], :double
attach_function :cos, [:double], :double
attach_function :sin, [:double], :double
View
1 lib/18/bigdecimal.rb
@@ -0,0 +1 @@
+require 'bigdecimal/ext/bigdecimal'
View
0 lib/ext/bigdecimal/README → lib/18/bigdecimal/README
File renamed without changes.
View
0 lib/ext/bigdecimal/bigdecimal_en.html → lib/18/bigdecimal/bigdecimal_en.html
File renamed without changes.
View
0 lib/ext/bigdecimal/bigdecimal_ja.html → lib/18/bigdecimal/bigdecimal_ja.html
File renamed without changes.
View
0 lib/ext/bigdecimal/Rakefile → lib/18/bigdecimal/ext/Rakefile
File renamed without changes.
View
0 lib/ext/bigdecimal/bigdecimal.c → lib/18/bigdecimal/ext/bigdecimal.c
File renamed without changes.
View
0 lib/ext/bigdecimal/bigdecimal.h → lib/18/bigdecimal/ext/bigdecimal.h
File renamed without changes.
View
0 lib/bigdecimal/jacobian.rb → lib/18/bigdecimal/jacobian.rb
File renamed without changes.
View
0 lib/bigdecimal/ludcmp.rb → lib/18/bigdecimal/ludcmp.rb
File renamed without changes.
View
0 lib/bigdecimal/math.rb → lib/18/bigdecimal/math.rb
File renamed without changes.
View
0 lib/bigdecimal/newton.rb → lib/18/bigdecimal/newton.rb
File renamed without changes.
View
0 lib/ext/bigdecimal/sample/linear.rb → lib/18/bigdecimal/sample/linear.rb
File renamed without changes.
View
0 lib/ext/bigdecimal/sample/nlsolve.rb → lib/18/bigdecimal/sample/nlsolve.rb
File renamed without changes.
View
0 lib/ext/bigdecimal/sample/pi.rb → lib/18/bigdecimal/sample/pi.rb
File renamed without changes.
View
0 lib/bigdecimal/util.rb → lib/18/bigdecimal/util.rb
File renamed without changes.
View
76 lib/18/date.rb
@@ -1110,7 +1110,7 @@ def hour() time[0] end
# Get the minute of this date.
def min() time[1] end
-
+
# Get the second of this date.
def sec() time[2] end
@@ -1689,3 +1689,77 @@ def to_datetime() self end
public_class_method :now
end
+
+class Date
+
+ class << self
+
+ def deprecated_class_method_alias(old, new) # :nodoc:
+ module_eval <<-"end;"
+ class << self
+ def #{old}(*args, &block)
+ if $VERBOSE
+ warn("\#{caller.shift.sub(/:in .*/, '')}: " \
+ "warning: \#{self}::#{old} is deprecated; " \
+ "use \#{self}::#{new}")
+ end
+ #{new}(*args, &block)
+ end
+ end
+ end;
+ end
+
+ private :deprecated_class_method_alias
+
+ def deprecated_alias(old, new) # :nodoc:
+ module_eval <<-"end;"
+ def #{old}(*args, &block)
+ if $VERBOSE
+ warn("\#{caller.shift.sub(/:in .*/, '')}: " \
+ "warning: \#{self.class}\##{old} is deprecated; " \
+ "use \#{self.class}\##{new}")
+ end
+ #{new}(*args, &block)
+ end
+ end;
+ end
+
+ private :deprecated_alias
+
+ end
+
+ [ %w(os? julian?),
+ %w(ns? gregorian?),
+ %w(exist1? valid_jd?),
+ %w(exist2? valid_ordinal?),
+ %w(exist3? valid_date?),
+ %w(exist? valid_date?),
+ %w(existw? valid_commercial?),
+ %w(new0 new!),
+ %w(new1 jd),
+ %w(new2 ordinal),
+ %w(new3 new),
+ %w(neww commercial)
+ ].each do |old, new|
+ deprecated_class_method_alias(old, new)
+ end
+
+ [ %w(os? julian?),
+ %w(ns? gregorian?),
+ %w(sg start),
+ %w(newsg new_start),
+ %w(of offset),
+ %w(newof new_offset)
+ ].each do |old, new|
+ deprecated_alias(old, new)
+ end
+
+ private :of, :newof
+
+end
+
+class DateTime < Date
+
+ public :of, :newof
+
+end
View
2 lib/18/dl.rb
@@ -1 +1 @@
-require 'ext/dl/dl'
+require 'dl/ext/dl'
View
0 lib/ext/dl/.gitignore → lib/18/dl/ext/.gitignore
File renamed without changes.
View
0 lib/ext/dl/depend → lib/18/dl/ext/depend
File renamed without changes.
View
0 lib/ext/dl/dl.c → lib/18/dl/ext/dl.c
File renamed without changes.
View
0 lib/ext/dl/dl.def → lib/18/dl/ext/dl.def
File renamed without changes.
View
0 lib/ext/dl/dl.h → lib/18/dl/ext/dl.h
File renamed without changes.
View
0 lib/ext/dl/doc/dl.txt → lib/18/dl/ext/doc/dl.txt
File renamed without changes.
View
0 lib/ext/dl/extconf.rb → lib/18/dl/ext/extconf.rb
File renamed without changes.
View
0 lib/ext/dl/h2rb → lib/18/dl/ext/h2rb
File renamed without changes.
View
0 lib/ext/dl/handle.c → lib/18/dl/ext/handle.c
File renamed without changes.
View
0 lib/ext/dl/install.rb → lib/18/dl/ext/install.rb
File renamed without changes.
View
0 lib/ext/dl/lib/dl/import.rb → lib/18/dl/ext/lib/dl/import.rb
File renamed without changes.
View
0 lib/ext/dl/lib/dl/struct.rb → lib/18/dl/ext/lib/dl/struct.rb
File renamed without changes.
View
0 lib/ext/dl/lib/dl/types.rb → lib/18/dl/ext/lib/dl/types.rb
File renamed without changes.
View
0 lib/ext/dl/lib/dl/win32.rb → lib/18/dl/ext/lib/dl/win32.rb
File renamed without changes.
View
0 lib/ext/dl/mkcall.rb → lib/18/dl/ext/mkcall.rb
File renamed without changes.
View
0 lib/ext/dl/mkcallback.rb → lib/18/dl/ext/mkcallback.rb
File renamed without changes.
View
0 lib/ext/dl/mkcbtable.rb → lib/18/dl/ext/mkcbtable.rb
File renamed without changes.
View
1 lib/ext/dl/ptr.c → lib/18/dl/ext/ptr.c
@@ -22,7 +22,6 @@ static st_table* st_memory_table;
static void
rb_dlmem_delete(void *ptr)
{
- rb_secure(4);
st_delete(st_memory_table, (st_data_t*)&ptr, NULL);
}
View
0 lib/ext/dl/sample/c++sample.C → lib/18/dl/ext/sample/c++sample.C
File renamed without changes.
View
0 lib/ext/dl/sample/c++sample.rb → lib/18/dl/ext/sample/c++sample.rb
File renamed without changes.
View
0 lib/ext/dl/sample/drives.rb → lib/18/dl/ext/sample/drives.rb
File renamed without changes.
View
0 lib/ext/dl/sample/getch.rb → lib/18/dl/ext/sample/getch.rb
File renamed without changes.
View
0 lib/ext/dl/sample/libc.rb → lib/18/dl/ext/sample/libc.rb
File renamed without changes.
View
0 lib/ext/dl/sample/msgbox.rb → lib/18/dl/ext/sample/msgbox.rb
File renamed without changes.
View
0 lib/ext/dl/sample/msgbox2.rb → lib/18/dl/ext/sample/msgbox2.rb
File renamed without changes.
View
0 lib/ext/dl/sample/stream.rb → lib/18/dl/ext/sample/stream.rb
File renamed without changes.
View
0 lib/ext/dl/sym.c → lib/18/dl/ext/sym.c
File renamed without changes.
View
0 lib/ext/dl/test/libtest.def → lib/18/dl/ext/test/libtest.def
File renamed without changes.
View
0 lib/ext/dl/test/test.c → lib/18/dl/ext/test/test.c
File renamed without changes.
View
0 lib/ext/dl/test/test.rb → lib/18/dl/ext/test/test.rb
File renamed without changes.
View
0 lib/ext/dl/type.rb → lib/18/dl/ext/type.rb
File renamed without changes.
View
0 lib/expect.rb → lib/18/expect.rb
File renamed without changes.
View
2 lib/kconv.rb → lib/18/kconv.rb
@@ -9,7 +9,7 @@
# some methods in String classes are added to allow easy conversion.
#
-require 'ext/nkf/nkf'
+require 'nkf/ext/nkf'
#
# Kanji Converter for Ruby.
View
1 lib/18/nkf.rb
@@ -0,0 +1 @@
+require 'nkf/ext/nkf'
View
0 lib/ext/nkf/Rakefile → lib/18/nkf/ext/Rakefile
File renamed without changes.
View
0 lib/ext/nkf/nkf-utf8/config.h → lib/18/nkf/ext/nkf-utf8/config.h
File renamed without changes.
View
0 lib/ext/nkf/nkf-utf8/nkf.c → lib/18/nkf/ext/nkf-utf8/nkf.c
File renamed without changes.
View
0 lib/ext/nkf/nkf-utf8/utf8tbl.c → lib/18/nkf/ext/nkf-utf8/utf8tbl.c
File renamed without changes.
View
0 lib/ext/nkf/nkf-utf8/utf8tbl.h → lib/18/nkf/ext/nkf-utf8/utf8tbl.h
File renamed without changes.
View
0 lib/ext/nkf/nkf.c → lib/18/nkf/ext/nkf.c
File renamed without changes.
View
0 lib/ext/syck/Rakefile → lib/18/syck/ext/Rakefile
File renamed without changes.
View
0 lib/ext/syck/bytecode.c → lib/18/syck/ext/bytecode.c
File renamed without changes.
View
0 lib/ext/syck/depend → lib/18/syck/ext/depend
File renamed without changes.
View
0 lib/ext/syck/emitter.c → lib/18/syck/ext/emitter.c
File renamed without changes.
View
0 lib/ext/syck/extconf.rb → lib/18/syck/ext/extconf.rb
File renamed without changes.
View
0 lib/ext/syck/gram.c → lib/18/syck/ext/gram.c
File renamed without changes.
View
0 lib/ext/syck/gram.h → lib/18/syck/ext/gram.h
File renamed without changes.
View
0 lib/ext/syck/handler.c → lib/18/syck/ext/handler.c
File renamed without changes.
View
0 lib/ext/syck/implicit.c → lib/18/syck/ext/implicit.c
File renamed without changes.
View
0 lib/ext/syck/node.c → lib/18/syck/ext/node.c
File renamed without changes.
View
0 lib/ext/syck/rubyext.c → lib/18/syck/ext/rubyext.c
File renamed without changes.
View
0 lib/ext/syck/st.c → lib/18/syck/ext/st.c
File renamed without changes.
View
0 lib/ext/syck/st.h → lib/18/syck/ext/st.h
File renamed without changes.
View
0 lib/ext/syck/syck.c → lib/18/syck/ext/syck.c
File renamed without changes.
View
0 lib/ext/syck/syck.h → lib/18/syck/ext/syck.h
File renamed without changes.
View
0 lib/ext/syck/token.c → lib/18/syck/ext/token.c
File renamed without changes.
View
0 lib/ext/syck/yaml2byte.c → lib/18/syck/ext/yaml2byte.c
File renamed without changes.
View
0 lib/ext/syck/yamlbyte.h → lib/18/syck/ext/yamlbyte.h
File renamed without changes.
View
0 lib/yaml.rb → lib/18/yaml.rb
File renamed without changes.
View
0 lib/yaml/baseemitter.rb → lib/18/yaml/baseemitter.rb
File renamed without changes.
View
0 lib/yaml/basenode.rb → lib/18/yaml/basenode.rb
File renamed without changes.
View
0 lib/yaml/constants.rb → lib/18/yaml/constants.rb
File renamed without changes.
View
0 lib/yaml/dbm.rb → lib/18/yaml/dbm.rb
File renamed without changes.
View
0 lib/yaml/encoding.rb → lib/18/yaml/encoding.rb
File renamed without changes.
View
0 lib/yaml/error.rb → lib/18/yaml/error.rb
File renamed without changes.
View
0 lib/yaml/loader.rb → lib/18/yaml/loader.rb
File renamed without changes.
View
0 lib/yaml/rubytypes.rb → lib/18/yaml/rubytypes.rb
File renamed without changes.
View
0 lib/yaml/store.rb → lib/18/yaml/store.rb
File renamed without changes.
View
0 lib/yaml/stream.rb → lib/18/yaml/stream.rb
File renamed without changes.
View
0 lib/yaml/stringio.rb → lib/18/yaml/stringio.rb
File renamed without changes.
View
2 lib/yaml/syck.rb → lib/18/yaml/syck.rb
@@ -2,7 +2,7 @@
# YAML::Syck module
# .. glues syck and yaml.rb together ..
#
-require 'ext/syck/syck'
+require 'syck/ext/syck'
require 'yaml/basenode'
module YAML
View
0 lib/yaml/tag.rb → lib/18/yaml/tag.rb
File renamed without changes.
View
0 lib/yaml/types.rb → lib/18/yaml/types.rb
File renamed without changes.
View
0 lib/yaml/yamlnode.rb → lib/18/yaml/yamlnode.rb
File renamed without changes.
View
0 lib/yaml/ypath.rb → lib/18/yaml/ypath.rb
File renamed without changes.
View
1 lib/19/bigdecimal.rb
@@ -0,0 +1 @@
+require 'bigdecimal/ext/bigdecimal'
View
2 lib/19/bigdecimal/.gitignore
@@ -0,0 +1,2 @@
+ext/mkmf.log
+ext/Makefile
View
60 lib/19/bigdecimal/README
@@ -0,0 +1,60 @@
+
+ Ruby BIGDECIMAL(Variable Precision) extension library.
+ Copyright (C) 1999 by Shigeo Kobayashi(shigeo@tinyforest.gr.jp)
+
+BigDecimal is copyrighted free software by Shigeo Kobayashi <shigeo@tinyforest.gr.jp>.
+You can redistribute it and/or modify it under either the terms of the GPL
+(see COPYING file), or the conditions below:
+
+ 1. You may make and give away verbatim copies of the source form of the
+ software without restriction, provided that you duplicate all of the
+ original copyright notices and associated disclaimers.
+
+ 2. You may modify your copy of the software in any way, provided that
+ you do at least ONE of the following:
+
+ a) place your modifications in the Public Domain or otherwise
+ make them Freely Available, such as by posting said
+ modifications to Usenet or an equivalent medium, or by allowing
+ the author to include your modifications in the software.
+
+ b) use the modified software only within your corporation or
+ organization.
+
+ c) rename any non-standard executables so the names do not conflict
+ with standard executables, which must also be provided.
+
+ d) make other distribution arrangements with the author.
+
+ 3. You may distribute the software in object code or executable
+ form, provided that you do at least ONE of the following:
+
+ a) distribute the executables and library files of the software,
+ together with instructions (in the manual page or equivalent)
+ on where to get the original distribution.
+
+ b) accompany the distribution with the machine-readable source of
+ the software.
+
+ c) give non-standard executables non-standard names, with
+ instructions on where to get the original software distribution.
+
+ d) make other distribution arrangements with the author.
+
+ 4. You may modify and include the part of the software into any other
+ software (possibly commercial).
+
+ 5. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
+ IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
+ PURPOSE.
+
+* The Author
+
+Feel free to send comments and bug reports to the author. Here is the
+author's latest mail address:
+
+ shigeo@tinyforest.gr.jp
+
+-------------------------------------------------------
+created at: Thu Dec 22 1999
View
792 lib/19/bigdecimal/bigdecimal_en.html
@@ -0,0 +1,792 @@
+<HTML>
+<HEAD>
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html">
+<style type="text/css"><!--
+body { color: #3f0f0f; background: #fefeff; margin-left: 2em; margin-right: 2em;}
+h1 { color: #ffffff; background-color: #3939AD; border-color: #FF00FF; width: 100%; border-style: solid;
+ border-top-width: 0.1em; border-bottom-width: 0.1em; border-right: none; border-left: none;
+ padding: 0.1em; font-weight: bold; font-size: 160%; text-align: center;}
+h2 { color: #00007f; background-color: #e7e7ff; border-color: #000094; width: 100%; border-style: solid; border-le ft: none; border-right: none; border-top-width: 0.1em; border-bottom-width: 0.1em; padding: 0.1em;
+ font-weight: bold; font-size: 110%;
+}
+h3 { color: #00007f; padding: 0.2em; font-size: 110%;}
+h4, h5 { color: #000000; padding: 0.2em; font-size: 100%;}
+table { margin-top: 0.2em; margin-bottom: 0.2em; margin-left: 2em; margin-right: 2em;}
+caption { color: #7f0000; font-weight: bold;}
+th { background: #e7e7ff; padding-left: 0.2em; padding-right: 0.2em;}
+td { background: #f3f7ff; padding-left: 0.2em; padding-right: 0.2em;}
+code { color: #0000df;}
+dt { margin-top: 0.2em;}
+li { margin-top: 0.2em;}
+pre
+{ BACKGROUND-COLOR: #d0d0d0; BORDER-BOTTOM: medium none; BORDER-LEFT: medium none;
+ BORDER-RIGHT: medium none; BORDER-TOP: medium none; LINE-HEIGHT: 100%; MARGIN: 12px 12px 12px 12px;
+ PADDING-BOTTOM: 12px; PADDING-LEFT: 12px; PADDING-RIGHT: 12px; PADDING-TOP: 12px;
+ WHITE-SPACE: pre; WIDTH: 100%
+}
+--></style>
+
+<TITLE>BigDecimal:An extension library for Ruby</TITLE>
+</HEAD>
+<BODY BGCOLOR=#FFFFE0>
+<H1>BigDecimal(Variable Precision Floating Library for Ruby)</H1>
+<DIV align="right"><A HREF="./bigdecimal_ja.html">Japanese</A></DIV><BR>
+BigDecimal is an extension library for the Ruby interpreter.
+Using BigDecimal class, you can obtain any number of significant digits in computation.
+For the details about Ruby see:<BR>
+<UL>
+<LI><A HREF="http://www.ruby-lang.org/en/">http://www.ruby-lang.org/en/</A>:Official Ruby page(English).</LI>
+<LI><A HREF="http://kahori.com/ruby/ring/">http://kahori.com/ruby/ring/</A>:Mutually linked pages relating to Ruby(Japanese).
+</LI>
+</UL>
+NOTE:<BR>
+ This software is provided "AS IS" and without any express or
+ implied warranties,including,without limitation,the implied
+ warranties of merchantability and fitness for a particular
+ purpose. For the details,see COPYING and README included in this
+ distribution.
+<BR>
+<hr>
+
+<H2>Contents</H2>
+<UL>
+<LI><A HREF="#INTRO">Introduction</LI>
+<LI><A HREF="#SPEC">Usage and methods</A></LI>