Permalink
Browse files

Add explicit encoding to kernel files.

  • Loading branch information...
1 parent 47e15f4 commit 948dd3c32d9e8d09af70604525f6884e01d11126 @brixen brixen committed Jan 7, 2012
Showing with 545 additions and 1 deletion.
  1. +2 −0 kernel/alpha.rb
  2. +2 −0 kernel/bootstrap/alias.rb
  3. +2 −0 kernel/bootstrap/array.rb
  4. +2 −0 kernel/bootstrap/array18.rb
  5. +2 −0 kernel/bootstrap/array19.rb
  6. +2 −0 kernel/bootstrap/atomic.rb
  7. +2 −0 kernel/bootstrap/basicobject.rb
  8. +2 −0 kernel/bootstrap/bignum.rb
  9. +2 −0 kernel/bootstrap/block_environment.rb
  10. +2 −0 kernel/bootstrap/bytearray.rb
  11. +2 −0 kernel/bootstrap/channel.rb
  12. +2 −0 kernel/bootstrap/class.rb
  13. +2 −0 kernel/bootstrap/compactlookuptable.rb
  14. +2 −0 kernel/bootstrap/compiled_method.rb
  15. +2 −0 kernel/bootstrap/configuration.rb
  16. +2 −0 kernel/bootstrap/dir.rb
  17. +2 −0 kernel/bootstrap/encoding.rb
  18. +2 −0 kernel/bootstrap/exception.rb
  19. +2 −0 kernel/bootstrap/executable.rb
  20. +2 −0 kernel/bootstrap/false.rb
  21. +2 −0 kernel/bootstrap/fixnum.rb
  22. +2 −0 kernel/bootstrap/gc.rb
  23. +2 −0 kernel/bootstrap/io.rb
  24. +2 −0 kernel/bootstrap/iseq.rb
  25. +2 −0 kernel/bootstrap/kernel.rb
  26. +2 −0 kernel/bootstrap/kernel18.rb
  27. +2 −0 kernel/bootstrap/kernel19.rb
  28. +2 −0 kernel/bootstrap/lookuptable.rb
  29. +2 −0 kernel/bootstrap/method_table.rb
  30. +2 −0 kernel/bootstrap/nil.rb
  31. +2 −0 kernel/bootstrap/object.rb
  32. +2 −0 kernel/bootstrap/object18.rb
  33. +2 −0 kernel/bootstrap/proc.rb
  34. +2 −0 kernel/bootstrap/process.rb
  35. +2 −0 kernel/bootstrap/regexp.rb
  36. +2 −0 kernel/bootstrap/rubinius.rb
  37. +2 −0 kernel/bootstrap/rubinius18.rb
  38. +2 −0 kernel/bootstrap/rubinius19.rb
  39. +2 −0 kernel/bootstrap/static_scope.rb
  40. +2 −0 kernel/bootstrap/string.rb
  41. +2 −0 kernel/bootstrap/string19.rb
  42. +2 −0 kernel/bootstrap/symbol.rb
  43. +2 −0 kernel/bootstrap/symbol19.rb
  44. +2 −0 kernel/bootstrap/thread.rb
  45. +2 −0 kernel/bootstrap/thread18.rb
  46. +2 −0 kernel/bootstrap/thread19.rb
  47. +2 −0 kernel/bootstrap/thunk.rb
  48. +2 −0 kernel/bootstrap/time.rb
  49. +2 −0 kernel/bootstrap/true.rb
  50. +2 −0 kernel/bootstrap/tuple.rb
  51. +2 −0 kernel/bootstrap/type.rb
  52. +2 −0 kernel/bootstrap/variable_scope.rb
  53. +2 −0 kernel/bootstrap/vm.rb
  54. +2 −0 kernel/bootstrap/weakref.rb
  55. +2 −0 kernel/common/argf.rb
  56. +2 −0 kernel/common/argf18.rb
  57. +2 −0 kernel/common/argf19.rb
  58. +2 −0 kernel/common/array.rb
  59. +2 −0 kernel/common/array18.rb
  60. +2 −0 kernel/common/array19.rb
  61. +2 −0 kernel/common/autoload.rb
  62. +2 −0 kernel/common/autoload18.rb
  63. +2 −0 kernel/common/autoload19.rb
  64. +2 −0 kernel/common/backtrace.rb
  65. +2 −0 kernel/common/basicobject.rb
  66. +2 −0 kernel/common/bignum.rb
  67. +2 −0 kernel/common/bignum18.rb
  68. +2 −0 kernel/common/bignum19.rb
  69. +2 −0 kernel/common/binding.rb
  70. +2 −0 kernel/common/block_environment.rb
  71. +2 −0 kernel/common/bytearray.rb
  72. +2 −0 kernel/common/bytearray18.rb
  73. +2 −0 kernel/common/bytearray19.rb
  74. +2 −0 kernel/common/capi.rb
  75. +2 −0 kernel/common/channel.rb
  76. +2 −0 kernel/common/class.rb
  77. +2 −0 kernel/common/class18.rb
  78. +2 −0 kernel/common/class19.rb
  79. +2 −0 kernel/common/codeloader.rb
  80. +2 −0 kernel/common/codeloader18.rb
  81. +2 −0 kernel/common/codeloader19.rb
  82. +2 −0 kernel/common/comparable.rb
  83. +2 −0 kernel/common/comparable18.rb
  84. +2 −0 kernel/common/comparable19.rb
  85. +2 −0 kernel/common/compiled_method.rb
  86. +2 −0 kernel/common/complex.rb
  87. +2 −0 kernel/common/complexifier.rb
  88. +2 −0 kernel/common/continuation.rb
  89. +2 −0 kernel/common/ctype.rb
  90. +2 −0 kernel/common/delegated_method.rb
  91. +2 −0 kernel/common/dir.rb
  92. +2 −0 kernel/common/dir18.rb
  93. +2 −0 kernel/common/dir19.rb
  94. +2 −0 kernel/common/dir_glob.rb
  95. +2 −0 kernel/common/encoding.rb
  96. +2 −0 kernel/common/enumerable.rb
  97. +2 −0 kernel/common/enumerable18.rb
  98. +2 −0 kernel/common/enumerable19.rb
  99. +2 −0 kernel/common/enumerator.rb
  100. +2 −0 kernel/common/enumerator18.rb
  101. +2 −0 kernel/common/enumerator19.rb
  102. +2 −0 kernel/common/env.rb
  103. +2 −0 kernel/common/errno.rb
  104. +2 −0 kernel/common/eval.rb
  105. +2 −0 kernel/common/eval18.rb
  106. +2 −0 kernel/common/eval19.rb
  107. +2 −0 kernel/common/exception.rb
  108. +2 −0 kernel/common/exception18.rb
  109. +2 −0 kernel/common/exception19.rb
  110. +2 −0 kernel/common/executable.rb
  111. +2 −0 kernel/common/false.rb
  112. +2 −0 kernel/common/fiber.rb
  113. +2 −0 kernel/common/fiber19.rb
  114. +2 −0 kernel/common/file.rb
  115. +2 −0 kernel/common/file19.rb
  116. +2 −0 kernel/common/filetest.rb
  117. +2 −0 kernel/common/fixnum.rb
  118. +2 −0 kernel/common/fixnum18.rb
  119. +2 −0 kernel/common/fixnum19.rb
  120. +2 −0 kernel/common/float.rb
  121. +2 −0 kernel/common/float18.rb
  122. +2 −0 kernel/common/float19.rb
  123. +3 −1 kernel/common/gc19.rb
  124. +2 −0 kernel/common/global.rb
  125. +2 −0 kernel/common/hash18.rb
  126. +2 −0 kernel/common/hash19.rb
  127. +2 −0 kernel/common/hash_hamt.rb
  128. +2 −0 kernel/common/hook.rb
  129. +2 −0 kernel/common/identitymap.rb
  130. +2 −0 kernel/common/immediate.rb
  131. +2 −0 kernel/common/integer.rb
  132. +2 −0 kernel/common/integer18.rb
  133. +2 −0 kernel/common/integer19.rb
  134. +2 −0 kernel/common/io.rb
  135. +2 −0 kernel/common/io18.rb
  136. +2 −0 kernel/common/io19.rb
  137. +2 −0 kernel/common/kernel.rb
  138. +2 −0 kernel/common/kernel18.rb
  139. +2 −0 kernel/common/kernel19.rb
  140. +2 −0 kernel/common/loadedfeatures.rb
  141. +2 −0 kernel/common/location.rb
  142. +2 −0 kernel/common/lookuptable.rb
  143. +2 −0 kernel/common/lrucache.rb
  144. +2 −0 kernel/common/main.rb
  145. +2 −0 kernel/common/marshal.rb
  146. +2 −0 kernel/common/marshal18.rb
  147. +2 −0 kernel/common/marshal19.rb
  148. +2 −0 kernel/common/math.rb
  149. +2 −0 kernel/common/math18.rb
  150. +2 −0 kernel/common/math19.rb
  151. +2 −0 kernel/common/method.rb
  152. +2 −0 kernel/common/method18.rb
  153. +2 −0 kernel/common/method19.rb
  154. +2 −0 kernel/common/method_table.rb
  155. +2 −0 kernel/common/module.rb
  156. +2 −0 kernel/common/module18.rb
  157. +2 −0 kernel/common/module19.rb
  158. +2 −0 kernel/common/native_method.rb
  159. +2 −0 kernel/common/nil.rb
  160. +2 −0 kernel/common/nil19.rb
  161. +2 −0 kernel/common/numeric.rb
  162. +2 −0 kernel/common/numeric18.rb
  163. +2 −0 kernel/common/numeric19.rb
  164. +2 −0 kernel/common/objectspace.rb
  165. +2 −0 kernel/common/precision.rb
  166. +2 −0 kernel/common/proc.rb
  167. +2 −0 kernel/common/proc18.rb
  168. +2 −0 kernel/common/proc19.rb
  169. +2 −0 kernel/common/process.rb
  170. +2 −0 kernel/common/random.rb
  171. +2 −0 kernel/common/random19.rb
  172. +2 −0 kernel/common/range.rb
  173. +2 −0 kernel/common/range19.rb
  174. +2 −0 kernel/common/rational.rb
  175. +2 −0 kernel/common/rationalizer.rb
  176. +2 −0 kernel/common/regexp.rb
  177. +2 −0 kernel/common/regexp18.rb
  178. +2 −0 kernel/common/regexp19.rb
  179. +2 −0 kernel/common/signal.rb
  180. +2 −0 kernel/common/sprinter.rb
  181. +2 −0 kernel/common/static_scope.rb
  182. +2 −0 kernel/common/static_scope18.rb
  183. +2 −0 kernel/common/static_scope19.rb
  184. +2 −0 kernel/common/string.rb
  185. +2 −0 kernel/common/string18.rb
  186. +2 −0 kernel/common/string19.rb
  187. +2 −0 kernel/common/struct.rb
  188. +2 −0 kernel/common/struct18.rb
  189. +2 −0 kernel/common/struct19.rb
  190. +2 −0 kernel/common/symbol.rb
  191. +2 −0 kernel/common/symbol18.rb
  192. +2 −0 kernel/common/symbol19.rb
  193. +2 −0 kernel/common/thread.rb
  194. +2 −0 kernel/common/thread_group.rb
  195. +2 −0 kernel/common/throw_catch.rb
  196. +2 −0 kernel/common/throw_catch18.rb
  197. +2 −0 kernel/common/throw_catch19.rb
  198. +2 −0 kernel/common/time.rb
  199. +2 −0 kernel/common/time18.rb
  200. +2 −0 kernel/common/time19.rb
  201. +2 −0 kernel/common/true.rb
  202. +2 −0 kernel/common/tuple.rb
  203. +2 −0 kernel/common/type.rb
  204. +2 −0 kernel/common/type18.rb
  205. +2 −0 kernel/common/type19.rb
  206. +2 −0 kernel/common/undefined.rb
  207. +2 −0 kernel/common/variable_scope.rb
  208. +2 −0 kernel/delta/agent.rb
  209. +2 −0 kernel/delta/class.rb
  210. +2 −0 kernel/delta/codeloader.rb
  211. +2 −0 kernel/delta/ctype.rb
  212. +2 −0 kernel/delta/exception.rb
  213. +2 −0 kernel/delta/ffi.rb
  214. +2 −0 kernel/delta/file.rb
  215. +2 −0 kernel/delta/filetest.rb
  216. +2 −0 kernel/delta/kernel.rb
  217. +2 −0 kernel/delta/kernel18.rb
  218. +2 −0 kernel/delta/kernel19.rb
  219. +2 −0 kernel/delta/math.rb
  220. +2 −0 kernel/delta/math19.rb
  221. +2 −0 kernel/delta/module.rb
  222. +2 −0 kernel/delta/options.rb
  223. +2 −0 kernel/delta/pack.rb
  224. +2 −0 kernel/delta/pack18.rb
  225. +2 −0 kernel/delta/pack19.rb
  226. +2 −0 kernel/delta/rubinius.rb
  227. +2 −0 kernel/delta/rubinius18.rb
  228. +2 −0 kernel/delta/rubinius19.rb
  229. +2 −0 kernel/delta/ruby_constants.rb
  230. +2 −0 kernel/delta/ruby_constants18.rb
  231. +2 −0 kernel/delta/ruby_constants19.rb
  232. +2 −0 kernel/delta/ruby_constants20.rb
  233. +2 −0 kernel/delta/signal.rb
  234. +2 −0 kernel/delta/stats.rb
  235. +2 −0 kernel/delta/struct.rb
  236. +2 −0 kernel/delta/thread.rb
  237. +2 −0 kernel/loader.rb
  238. +2 −0 kernel/platform/env.rb
  239. +2 −0 kernel/platform/ffi.rb
  240. +2 −0 kernel/platform/file.rb
  241. +2 −0 kernel/platform/library.rb
  242. +2 −0 kernel/platform/math.rb
  243. +2 −0 kernel/platform/math19.rb
  244. +2 −0 kernel/platform/pointer.rb
  245. +2 −0 kernel/platform/pointer_accessors.rb
  246. +2 −0 kernel/platform/posix.rb
  247. +2 −0 kernel/platform/struct.rb
  248. +2 −0 lib/compiler/ast.rb
  249. +2 −0 lib/compiler/ast/constants.rb
  250. +2 −0 lib/compiler/ast/control_flow.rb
  251. +2 −0 lib/compiler/ast/data.rb
  252. +2 −0 lib/compiler/ast/definitions.rb
  253. +2 −0 lib/compiler/ast/exceptions.rb
  254. +2 −0 lib/compiler/ast/file.rb
  255. +2 −0 lib/compiler/ast/grapher.rb
  256. +2 −0 lib/compiler/ast/literals.rb
  257. +2 −0 lib/compiler/ast/node.rb
  258. +2 −0 lib/compiler/ast/operators.rb
  259. +2 −0 lib/compiler/ast/self.rb
  260. +2 −0 lib/compiler/ast/sends.rb
  261. +2 −0 lib/compiler/ast/transforms.rb
  262. +2 −0 lib/compiler/ast/values.rb
  263. +2 −0 lib/compiler/ast/variables.rb
  264. +2 −0 lib/compiler/compiled_file.rb
  265. +2 −0 lib/compiler/compiler.rb
  266. +2 −0 lib/compiler/evaluator.rb
  267. +2 −0 lib/compiler/generator.rb
  268. +2 −0 lib/compiler/iseq.rb
  269. +2 −0 lib/compiler/locals.rb
  270. +2 −0 lib/compiler/printers.rb
  271. +2 −0 lib/compiler/runtime.rb
  272. +2 −0 lib/compiler/stages.rb
View
@@ -1,3 +1,5 @@
+# -*- encoding: us-ascii -*-
+
#
# This is the beginning of loading Ruby code. At this point, the VM
# is bootstrapped and the fundamental data structures, primitive
@@ -1,3 +1,5 @@
+# -*- encoding: us-ascii -*-
+
module Rubinius
class Alias
attr_reader :original_exec
@@ -1,3 +1,5 @@
+# -*- encoding: us-ascii -*-
+
class Array
attr_accessor :total
attr_accessor :tuple
@@ -1,3 +1,5 @@
+# -*- encoding: us-ascii -*-
+
class Array
# Creates a new Array from the return values of passing
# each element in self to the supplied block.
@@ -1,3 +1,5 @@
+# -*- encoding: us-ascii -*-
+
class Array
# Creates a new Array from the return values of passing
# each element in self to the supplied block.
@@ -1,3 +1,5 @@
+# -*- encoding: us-ascii -*-
+
module Rubinius
class AtomicReference
def initialize(val=nil)
@@ -1,3 +1,5 @@
+# -*- encoding: us-ascii -*-
+
class BasicObject
def initialize
# do nothing
@@ -1,3 +1,5 @@
+# -*- encoding: us-ascii -*-
+
class Bignum < Integer
# unary operators
@@ -1,3 +1,5 @@
+# -*- encoding: us-ascii -*-
+
module Rubinius
class BlockEnvironment
def self.allocate
@@ -1,3 +1,5 @@
+# -*- encoding: us-ascii -*-
+
module Rubinius
class ByteArray
def self.allocate
@@ -1,3 +1,5 @@
+# -*- encoding: us-ascii -*-
+
##
# Channel is a FIFO, thread-aware value passing class that can hold any number
# of objects similar to Queue. Use #send to add objects to the channel and
@@ -1,3 +1,5 @@
+# -*- encoding: us-ascii -*-
+
class Class
def self.allocate
Rubinius.primitive :class_s_allocate
@@ -1,3 +1,5 @@
+# -*- encoding: us-ascii -*-
+
module Rubinius
class CompactLookupTable
def self.allocate
@@ -1,3 +1,5 @@
+# -*- encoding: us-ascii -*-
+
module Rubinius
class CompiledMethod < Executable
@@ -1,3 +1,5 @@
+# -*- encoding: us-ascii -*-
+
module Rubinius
class Configuration
def initialize
@@ -1,3 +1,5 @@
+# -*- encoding: us-ascii -*-
+
class Dir
def self.allocate
Rubinius.primitive :dir_allocate
@@ -1,3 +1,5 @@
+# -*- encoding: us-ascii -*-
+
# This stupidity is necessary to counter the stupidity of checking
# 1.9 syntax support by checking if Encoding is defined. Who said
# two stupids don't make a smart.
@@ -1,3 +1,5 @@
+# -*- encoding: us-ascii -*-
+
class Exception
def capture_backtrace!(offset)
# replaced in delta with a real implementation
@@ -1,3 +1,5 @@
+# -*- encoding: us-ascii -*-
+
module Rubinius
class Executable
attr_accessor :serial
@@ -1,3 +1,5 @@
+# -*- encoding: us-ascii -*-
+
class FalseClass
def &(other)
false
@@ -1,3 +1,5 @@
+# -*- encoding: us-ascii -*-
+
class Fixnum < Integer
def self.===(obj)
@@ -1,3 +1,5 @@
+# -*- encoding: us-ascii -*-
+
module GC
def self.start
run(false)
@@ -1,3 +1,5 @@
+# -*- encoding: us-ascii -*-
+
class IO
class InternalBuffer
@@ -1,3 +1,5 @@
+# -*- encoding: us-ascii -*-
+
module Rubinius
class InstructionSequence
def initialize(size)
@@ -1,3 +1,5 @@
+# -*- encoding: us-ascii -*-
+
module Kernel
def equal?(other)
Rubinius.primitive :object_equal
@@ -1,3 +1,5 @@
+# -*- encoding: us-ascii -*-
+
module Kernel
def equal?(other)
Rubinius.primitive :object_equal
@@ -1,3 +1,5 @@
+# -*- encoding: us-ascii -*-
+
# TODO: Temporary! Object should find these methods in BasicObject
# but we fake that until method lookup is fixed for 1.9.
module Kernel
@@ -1,3 +1,5 @@
+# -*- encoding: us-ascii -*-
+
##
# A LookupTable is similar to a Hash in that keys are used to set and
# reference values. However, unlike Hash, whether a key matches an
@@ -1,3 +1,5 @@
+# -*- encoding: us-ascii -*-
+
##
# Method table associates symbols (names) with methods (executables). Each
@@ -1,3 +1,5 @@
+# -*- encoding: us-ascii -*-
+
class NilClass
def &(other)
false
@@ -1,3 +1,5 @@
+# -*- encoding: us-ascii -*-
+
class Object
def __fixnum__
Rubinius.primitive :object_is_fixnum
@@ -1,3 +1,5 @@
+# -*- encoding: us-ascii -*-
+
class Object
def initialize
end
@@ -1,3 +1,5 @@
+# -*- encoding: us-ascii -*-
+
class Proc
def self.allocate
Rubinius.primitive :proc_allocate
@@ -1,3 +1,5 @@
+# -*- encoding: us-ascii -*-
+
module Process
def self.perform_fork
Rubinius.primitive :vm_fork
@@ -1,3 +1,5 @@
+# -*- encoding: us-ascii -*-
+
class Regexp
def self.allocate
@@ -1,3 +1,5 @@
+# -*- encoding: us-ascii -*-
+
module Rubinius
# Ruby 1.8 returns strings for method and constant names
def self.convert_to_names(list)
@@ -1,3 +1,5 @@
+# -*- encoding: us-ascii -*-
+
module Rubinius
# Ruby 1.8 returns strings for method and constant names
def self.convert_to_names(list)
@@ -1,3 +1,5 @@
+# -*- encoding: us-ascii -*-
+
module Rubinius
def self.convert_to_names(list)
list
@@ -1,3 +1,5 @@
+# -*- encoding: us-ascii -*-
+
module Rubinius
class StaticScope
def self.of_sender
@@ -1,3 +1,5 @@
+# -*- encoding: us-ascii -*-
+
class String
attr_reader :num_bytes
attr_reader_specific :num_bytes, :bytesize
@@ -1,3 +1,5 @@
+# -*- encoding: us-ascii -*-
+
class String
attr_writer :encoding
attr_writer :ascii_only
@@ -1,3 +1,5 @@
+# -*- encoding: us-ascii -*-
+
class Symbol
def self.===(obj)
Rubinius.primitive :symbol_s_eqq
@@ -1,3 +1,5 @@
+# -*- encoding: us-ascii -*-
+
class Symbol
def encoding
Rubinius.primitive :symbol_encoding
@@ -1,3 +1,5 @@
+# -*- encoding: us-ascii -*-
+
class Thread
def self.current
@@ -1,3 +1,5 @@
+# -*- encoding: us-ascii -*-
+
class Thread
def self.start(*args)
thr = Rubinius.invoke_primitive :thread_allocate, self
@@ -1,3 +1,5 @@
+# -*- encoding: us-ascii -*-
+
class Thread
def self.start(*args)
raise ArgumentError.new("no block passed to Thread.start") unless block_given?
@@ -1,3 +1,5 @@
+# -*- encoding: us-ascii -*-
+
module Rubinius
class Thunk
def self.new(value)
@@ -1,3 +1,5 @@
+# -*- encoding: us-ascii -*-
+
class Time
def self.now
Rubinius.primitive :time_s_now
@@ -1,3 +1,5 @@
+# -*- encoding: us-ascii -*-
+
class TrueClass
def &(other)
!!other
@@ -1,3 +1,5 @@
+# -*- encoding: us-ascii -*-
+
module Rubinius
class Tuple
@@ -1,3 +1,5 @@
+# -*- encoding: us-ascii -*-
+
# The Type module provides facilities for accessing various "type" related
# data about an object, as well as providing type coercion methods. These
# facilities are independent of the object and thus are more robust in the
@@ -1,3 +1,5 @@
+# -*- encoding: us-ascii -*-
+
module Rubinius
class VariableScope
def self.of_sender
@@ -1,3 +1,5 @@
+# -*- encoding: us-ascii -*-
+
class Rubinius::VM
# Get an Array of Rubinius::Location objects representing the current
@@ -1,3 +1,5 @@
+# -*- encoding: us-ascii -*-
+
class WeakRef
class RefError < RuntimeError; end
@@ -1,3 +1,5 @@
+# -*- encoding: us-ascii -*-
+
module Rubinius
@@ -1,3 +1,5 @@
+# -*- encoding: us-ascii -*-
+
module Rubinius
class ARGFClass
@@ -1,3 +1,5 @@
+# -*- encoding: us-ascii -*-
+
module Rubinius
class ARGFClass
@@ -1,3 +1,5 @@
+# -*- encoding: us-ascii -*-
+
##
# Arrays are ordered, integer-indexed collections of any object. Array
# indexing starts at 0, as in C or Java. A negative index is assumed to be
@@ -1,3 +1,5 @@
+# -*- encoding: us-ascii -*-
+
class Array
def set_index(index, ent, fin=undefined)
Rubinius.primitive :array_aset
@@ -1,3 +1,5 @@
+# -*- encoding: us-ascii -*-
+
class Array
# Try to convert obj into an array, using to_ary method.
# Returns converted array or nil if obj cannot be converted
@@ -1,3 +1,5 @@
+# -*- encoding: us-ascii -*-
+
##
# Used to implement Module#autoload.
@@ -1,3 +1,5 @@
+# -*- encoding: us-ascii -*-
+
class Autoload
##
# When any code that finds a constant sees an instance of Autoload as its match,
@@ -1,3 +1,5 @@
+# -*- encoding: us-ascii -*-
+
class Autoload
##
# When any code that finds a constant sees an instance of Autoload as its match,
@@ -1,3 +1,5 @@
+# -*- encoding: us-ascii -*-
+
##
# Contains all logic for gathering and displaying backtraces.
@@ -1,3 +1,5 @@
+# -*- encoding: us-ascii -*-
+
class BasicObject
def method_missing(meth, *args)
Kernel.raise NoMethodError, "Unable to send '#{meth}' on instance of BasicObject"
@@ -1,3 +1,5 @@
+# -*- encoding: us-ascii -*-
+
##
# Bignum objects hold integers outside the range of Fixnum. Bignum objects are
# created automatically when integer calculations would otherwise overflow a
Oops, something went wrong. Retry.

7 comments on commit 948dd3c

@robin850

What the point to use us-ascii instead of something like UTF-8 please ?

@dbussink
Member

Because this is how Ruby behaves. Strings coming from things like Fixnum#to_s are US-ASCII by default. Using this encoding as the default is the least work for us, otherwise we have to do much more work to tag strings created here with US-ASCII

@robin850

Ok, thanks for taking the time to answer to my question.

@brixen
Member
brixen commented on 948dd3c Nov 5, 2012

@robin850 The issue is that the Rubinius kernel has to be compilable with both Ruby 1.8 and 1.9 and there is no encoding support in 1.8. The melbourne parser, if running in a 1.8 Ruby, fakes enough of the encoding API to support compiling 1.9 code, but cannot actually deal with encodings. There is absolutely nothing in the core library that requires Encodings support but by explicitly setting the encoding, in 1.9, literals will have a defined rather than default encoding. The default encoding rules in MRI are complex and silly.

@robin850

@brixen : I see. Thanks for explanation. For which version are you going to drop 1.8 support ? I imagine that it's harder to support 1.8 on Rubinius.

@brixen
Member
brixen commented on 948dd3c Nov 5, 2012

@robin850 There is absolutely nothing hard about supporting 1.8 on Rubinius. But this isn't about Rubinius support for a language mode. It's about ensuring Rubinius can still be built with MRI 1.8 and some systems still have 1.8.6. Even with the very newest ubuntu, MRI 1.8.7 is the default when you install ruby.

@robin850

@brixen : Ah ok, I see. Thanks once again. :)

Please sign in to comment.