Skip to content
This repository
Browse code

Use 'encoding: ' consistently, not coding:.

  • Loading branch information...
commit 764471e25d66b6eb2ce37a45d8ad7a2472856555 1 parent b6e1dc9
Brian Shirai brixen authored

Showing 62 changed files with 69 additions and 69 deletions. Show diff stats Hide diff stats

  1. +1 1  command_line/dash_upper_e_spec.rb
  2. +1 1  core/array/fixtures/encoded_strings.rb
  3. +1 1  core/array/shared/index.rb
  4. +1 1  core/encoding/converter/primitive_errinfo_spec.rb
  5. +1 1  core/encoding/converter/putback_spec.rb
  6. +1 1  core/encoding/invalid_byte_sequence_error/error_bytes_spec.rb
  7. +1 1  core/file/expand_path_spec.rb
  8. +1 1  core/io/binwrite_spec.rb
  9. +1 1  core/io/inspect_spec.rb
  10. +1 1  core/io/write_spec.rb
  11. +1 1  core/marshal/dump_spec.rb
  12. +1 1  core/module/fixtures/classes19.rb
  13. +1 1  core/nil/to_h_spec.rb
  14. +1 1  core/random/bytes_spec.rb
  15. +1 1  core/string/count_spec.rb
  16. +1 1  core/string/delete_spec.rb
  17. +1 1  core/string/encoding_spec.rb
  18. +1 1  core/string/shared/succ.rb
  19. +1 1  core/string/squeeze_spec.rb
  20. +1 1  core/symbol/casecmp_spec.rb
  21. +1 1  core/symbol/element_reference_spec.rb
  22. +1 1  core/symbol/fixtures/classes.rb
  23. +1 1  core/symbol/shared/slice.rb
  24. +1 1  core/symbol/slice_spec.rb
  25. +1 1  core/thread/initialize_spec.rb
  26. +1 1  core/time/_dump_spec.rb
  27. +1 1  language/constants_spec.rb
  28. +3 3 language/encoding_spec.rb
  29. +1 1  language/fixtures/coding_us_ascii.rb
  30. +1 1  language/fixtures/coding_utf_8.rb
  31. +1 1  language/fixtures/constant_visibility.rb
  32. +6 6 language/magic_comment_spec.rb
  33. +1 1  language/regexp/encoding_spec.rb
  34. +1 1  language/regexp/escapes_spec.rb
  35. +1 1  library/digest/md5/shared/constants.rb
  36. +1 1  library/digest/sha1/shared/constants.rb
  37. +1 1  library/digest/sha256/shared/constants.rb
  38. +1 1  library/digest/sha384/shared/constants.rb
  39. +1 1  library/digest/sha512/shared/constants.rb
  40. +1 1  library/matrix/eigenvalue_decomposition/eigenvalue_matrix_spec.rb
  41. +1 1  library/matrix/eigenvalue_decomposition/eigenvalues_spec.rb
  42. +1 1  library/matrix/eigenvalue_decomposition/eigenvector_matrix_spec.rb
  43. +1 1  library/matrix/eigenvalue_decomposition/eigenvectors_spec.rb
  44. +1 1  library/matrix/eigenvalue_decomposition/initialize_spec.rb
  45. +1 1  library/matrix/eigenvalue_decomposition/to_a_spec.rb
  46. +1 1  library/matrix/fixtures/classes.rb
  47. +1 1  library/matrix/lup_decomposition/initialize_spec.rb
  48. +1 1  library/matrix/lup_decomposition/l_spec.rb
  49. +1 1  library/matrix/lup_decomposition/to_a_spec.rb
  50. +1 1  library/matrix/lup_decomposition/u_spec.rb
  51. +1 1  library/matrix/round_spec.rb
  52. +1 1  library/openssl/shared/constants.rb
  53. +1 1  library/openssl/x509/name/parse_spec.rb
  54. +1 1  library/socket/basicsocket/recv_spec.rb
  55. +1 1  library/socket/socket/gethostbyname_spec.rb
  56. +1 1  library/stringio/external_encoding.rb
  57. +1 1  library/stringio/internal_encoding.rb
  58. +1 1  library/stringio/set_encoding.rb
  59. +1 1  library/zlib/deflate/deflate_spec.rb
  60. +1 1  library/zlib/deflate/set_dictionary_spec.rb
  61. +1 1  library/zlib/inflate/append_spec.rb
  62. +1 1  library/zlib/inflate/inflate_spec.rb
2  command_line/dash_upper_e_spec.rb
@@ -6,4 +6,4 @@
6 6 :args => '2>&1').should =~ /RuntimeError/
7 7 end
8 8 end
9   -end
  9 +end
2  core/array/fixtures/encoded_strings.rb
@@ -66,4 +66,4 @@ def self.array_with_usascii_and_ascii8bit_strings
66 66 "\xFF".force_encoding('ASCII-8BIT')
67 67 ]
68 68 end
69   -end
  69 +end
2  core/array/shared/index.rb
@@ -27,4 +27,4 @@ def x.==(obj) 3 == obj; end
27 27 [4, 2, 1, 5, 1, 3].send(@method, 5) {|x| x < 2}.should == 3
28 28 end
29 29 end
30   -end
  30 +end
2  core/encoding/converter/primitive_errinfo_spec.rb
... ... @@ -1,4 +1,4 @@
1   -# -*- coding: US-ASCII -*-
  1 +# -*- encoding: US-ASCII -*-
2 2 require File.expand_path('../../../../spec_helper', __FILE__)
3 3
4 4 with_feature :encoding do
2  core/encoding/converter/putback_spec.rb
... ... @@ -1,4 +1,4 @@
1   -# -*- coding: US-ASCII -*-
  1 +# -*- encoding: US-ASCII -*-
2 2 require File.expand_path('../../../../spec_helper', __FILE__)
3 3
4 4 with_feature :encoding do
2  core/encoding/invalid_byte_sequence_error/error_bytes_spec.rb
... ... @@ -1,4 +1,4 @@
1   -# -*- coding: US-ASCII -*-
  1 +# -*- encoding: US-ASCII -*-
2 2 require File.expand_path('../../fixtures/classes', __FILE__)
3 3
4 4 with_feature :encoding do
2  core/file/expand_path_spec.rb
... ... @@ -1,4 +1,4 @@
1   -# -*- coding: US-ASCII -*-
  1 +# -*- encoding: US-ASCII -*-
2 2 require File.expand_path('../../../spec_helper', __FILE__)
3 3 require File.expand_path('../fixtures/common', __FILE__)
4 4
2  core/io/binwrite_spec.rb
@@ -7,4 +7,4 @@
7 7
8 8 it "needs to be reviewed for spec completeness"
9 9 end
10   -end
  10 +end
2  core/io/inspect_spec.rb
@@ -22,4 +22,4 @@
22 22 end
23 23 end
24 24 end
25   -end
  25 +end
2  core/io/write_spec.rb
... ... @@ -1,4 +1,4 @@
1   -# -*- coding: US-ASCII -*-
  1 +# -*- encoding: US-ASCII -*-
2 2 require File.expand_path('../../../spec_helper', __FILE__)
3 3 require File.expand_path('../fixtures/classes', __FILE__)
4 4 require File.expand_path('../shared/write', __FILE__)
2  core/marshal/dump_spec.rb
... ... @@ -1,4 +1,4 @@
1   -# -*- coding: US-ASCII -*-
  1 +# -*- encoding: US-ASCII -*-
2 2 require File.expand_path('../../../spec_helper', __FILE__)
3 3 require File.expand_path('../fixtures/marshal_data', __FILE__)
4 4
2  core/module/fixtures/classes19.rb
@@ -4,4 +4,4 @@ module PrivConstModule
4 4 private_constant :PRIVATE_CONSTANT
5 5 PUBLIC_CONSTANT = 2
6 6 end
7   -end
  7 +end
2  core/nil/to_h_spec.rb
@@ -7,4 +7,4 @@
7 7 nil.to_h.default.should == nil
8 8 end
9 9 end
10   -end
  10 +end
2  core/random/bytes_spec.rb
... ... @@ -1,4 +1,4 @@
1   -# -*- coding: US-ASCII -*-
  1 +# -*- encoding: US-ASCII -*-
2 2 require File.expand_path('../../../spec_helper', __FILE__)
3 3
4 4 ruby_version_is "1.9" do
2  core/string/count_spec.rb
... ... @@ -1,4 +1,4 @@
1   -# -*- coding: US-ASCII -*-
  1 +# -*- encoding: US-ASCII -*-
2 2 require File.expand_path('../../../spec_helper', __FILE__)
3 3 require File.expand_path('../fixtures/classes.rb', __FILE__)
4 4
2  core/string/delete_spec.rb
... ... @@ -1,4 +1,4 @@
1   -# -*- coding: US-ASCII -*-
  1 +# -*- encoding: US-ASCII -*-
2 2 require File.expand_path('../../../spec_helper', __FILE__)
3 3 require File.expand_path('../fixtures/classes.rb', __FILE__)
4 4
2  core/string/encoding_spec.rb
... ... @@ -1,4 +1,4 @@
1   -# -*- coding: US-ASCII -*-
  1 +# -*- encoding: US-ASCII -*-
2 2 require File.expand_path('../../../spec_helper', __FILE__)
3 3 require File.expand_path('../fixtures/iso-8859-9-encoding', __FILE__)
4 4
2  core/string/shared/succ.rb
... ... @@ -1,4 +1,4 @@
1   -# -*- coding: US-ASCII -*-
  1 +# -*- encoding: US-ASCII -*-
2 2 describe :string_succ, :shared => true do
3 3 it "returns an empty string for empty strings" do
4 4 "".send(@method).should == ""
2  core/string/squeeze_spec.rb
... ... @@ -1,4 +1,4 @@
1   -# -*- coding: US-ASCII -*-
  1 +# -*- encoding: US-ASCII -*-
2 2 require File.expand_path('../../../spec_helper', __FILE__)
3 3 require File.expand_path('../fixtures/classes.rb', __FILE__)
4 4
2  core/symbol/casecmp_spec.rb
... ... @@ -1,4 +1,4 @@
1   -# -*- coding: US-ASCII -*-
  1 +# -*- encoding: US-ASCII -*-
2 2 require File.expand_path('../../../spec_helper', __FILE__)
3 3
4 4 ruby_version_is "1.9" do
2  core/symbol/element_reference_spec.rb
@@ -5,4 +5,4 @@
5 5 describe "Symbol#[]" do
6 6 it_behaves_like(:symbol_slice, :[])
7 7 end
8   -end
  8 +end
2  core/symbol/fixtures/classes.rb
... ... @@ -1,3 +1,3 @@
1 1 module SymbolSpecs
2 2 class MyRange < Range; end
3   -end
  3 +end
2  core/symbol/shared/slice.rb
@@ -259,4 +259,4 @@
259 259 :symbol.send(@method, "foo").should be_nil
260 260 end
261 261 end
262   -end
  262 +end
2  core/symbol/slice_spec.rb
@@ -5,4 +5,4 @@
5 5 describe "Symbol#slice" do
6 6 it_behaves_like(:symbol_slice, :slice)
7 7 end
8   -end
  8 +end
2  core/thread/initialize_spec.rb
... ... @@ -1,2 +1,2 @@
1 1 require File.expand_path('../../../spec_helper', __FILE__)
2   -require File.expand_path('../fixtures/classes', __FILE__)
  2 +require File.expand_path('../fixtures/classes', __FILE__)
2  core/time/_dump_spec.rb
... ... @@ -1,4 +1,4 @@
1   -# -*- coding: US-ASCII -*-
  1 +# -*- encoding: US-ASCII -*-
2 2 require File.expand_path('../../../spec_helper', __FILE__)
3 3 require File.expand_path('../fixtures/methods', __FILE__)
4 4
2  language/constants_spec.rb
@@ -554,4 +554,4 @@ class ConstantVisibility::PrivConstClass::PRIVATE_CONSTANT_CLASS; end
554 554 end
555 555 end
556 556
557   -end
  557 +end
6 language/encoding_spec.rb
... ... @@ -1,4 +1,4 @@
1   -# -*- coding: US-ASCII -*-
  1 +# -*- encoding: US-ASCII -*-
2 2 require File.expand_path('../../spec_helper', __FILE__)
3 3 require File.expand_path('../fixtures/coding_us_ascii', __FILE__)
4 4 require File.expand_path('../fixtures/coding_utf_8', __FILE__)
@@ -19,10 +19,10 @@
19 19 end
20 20
21 21 it "is the encoding specified by a magic comment inside an eval" do
22   - code = "# coding: ASCII-8BIT\n__ENCODING__".force_encoding("US-ASCII")
  22 + code = "# encoding: ASCII-8BIT\n__ENCODING__".force_encoding("US-ASCII")
23 23 eval(code).should == Encoding::ASCII_8BIT
24 24
25   - code = "# coding: US-ASCII\n__ENCODING__".force_encoding("ASCII-8BIT")
  25 + code = "# encoding: US-ASCII\n__ENCODING__".force_encoding("ASCII-8BIT")
26 26 eval(code).should == Encoding::US_ASCII
27 27 end
28 28
2  language/fixtures/coding_us_ascii.rb
... ... @@ -1,4 +1,4 @@
1   -# coding: US-ASCII
  1 +# encoding: US-ASCII
2 2
3 3 module CodingUS_ASCII
4 4 def self.encoding
2  language/fixtures/coding_utf_8.rb
... ... @@ -1,4 +1,4 @@
1   -# coding: UTF-8
  1 +# encoding: UTF-8
2 2
3 3 module CodingUTF_8
4 4 def self.encoding
2  language/fixtures/constant_visibility.rb
@@ -75,4 +75,4 @@ def self.reset_private_constants
75 75 class Object
76 76 PRIVATE_CONSTANT_IN_OBJECT = true
77 77 private_constant :PRIVATE_CONSTANT_IN_OBJECT
78   -end
  78 +end
12 language/magic_comment_spec.rb
@@ -8,7 +8,7 @@
8 8
9 9 it "determines __ENCODING__" do
10 10 eval(<<EOS.force_encoding("US-ASCII")).should == Encoding::ASCII_8BIT
11   -# coding: ASCII-8BIT
  11 +# encoding: ASCII-8BIT
12 12 __ENCODING__
13 13 EOS
14 14 end
@@ -23,18 +23,18 @@
23 23 it "must be at the first line" do
24 24 eval(<<EOS.force_encoding("US-ASCII")).should == Encoding::US_ASCII
25 25
26   -# coding: ASCII-8BIT
  26 +# encoding: ASCII-8BIT
27 27 __ENCODING__
28 28 EOS
29 29 end
30 30
31 31 it "must be the first token of the line" do
32 32 eval(<<EOS.force_encoding("US-ASCII")).should == Encoding::US_ASCII
33   -1+1 # coding: ASCII-8BIT
  33 +1+1 # encoding: ASCII-8BIT
34 34 __ENCODING__
35 35 EOS
36 36 eval(<<EOS.force_encoding("US-ASCII")).should == Encoding::ASCII_8BIT
37   - # coding: ASCII-8BIT
  37 + # encoding: ASCII-8BIT
38 38 __ENCODING__
39 39 EOS
40 40 end
@@ -42,14 +42,14 @@
42 42 it "can be after the shebang" do
43 43 eval(<<EOS.force_encoding("US-ASCII")).should == Encoding::ASCII_8BIT
44 44 #!/usr/bin/ruby -Ku
45   -# coding: ASCII-8BIT
  45 +# encoding: ASCII-8BIT
46 46 __ENCODING__
47 47 EOS
48 48 end
49 49
50 50 it "can take Emacs style" do
51 51 eval(<<EOS.force_encoding("US-ASCII")).should == Encoding::ASCII_8BIT
52   -# -*- coding: ascii-8bit -*-
  52 +# -*- encoding: ascii-8bit -*-
53 53 __ENCODING__
54 54 EOS
55 55 end
2  language/regexp/encoding_spec.rb
... ... @@ -1,4 +1,4 @@
1   -# -*- coding: US-ASCII -*-
  1 +# -*- encoding: US-ASCII -*-
2 2 require File.expand_path('../../../spec_helper', __FILE__)
3 3 require File.expand_path('../../fixtures/classes', __FILE__)
4 4
2  language/regexp/escapes_spec.rb
... ... @@ -1,4 +1,4 @@
1   -# -*- coding: US-ASCII -*-
  1 +# -*- encoding: US-ASCII -*-
2 2 require File.expand_path('../../../spec_helper', __FILE__)
3 3 require File.expand_path('../../fixtures/classes', __FILE__)
4 4
2  library/digest/md5/shared/constants.rb
... ... @@ -1,4 +1,4 @@
1   -# -*- coding: US-ASCII -*-
  1 +# -*- encoding: US-ASCII -*-
2 2 require 'digest/md5'
3 3
4 4 module MD5Constants
2  library/digest/sha1/shared/constants.rb
... ... @@ -1,4 +1,4 @@
1   -# -*- coding: US-ASCII -*-
  1 +# -*- encoding: US-ASCII -*-
2 2 require 'digest/sha1'
3 3
4 4 module SHA1Constants
2  library/digest/sha256/shared/constants.rb
... ... @@ -1,4 +1,4 @@
1   -# -*- coding: US-ASCII -*-
  1 +# -*- encoding: US-ASCII -*-
2 2 require 'digest/sha2'
3 3
4 4 module SHA256Constants
2  library/digest/sha384/shared/constants.rb
... ... @@ -1,4 +1,4 @@
1   -# -*- coding: US-ASCII -*-
  1 +# -*- encoding: US-ASCII -*-
2 2 require 'digest/sha2'
3 3
4 4 module SHA384Constants
2  library/digest/sha512/shared/constants.rb
... ... @@ -1,4 +1,4 @@
1   -# -*- coding: US-ASCII -*-
  1 +# -*- encoding: US-ASCII -*-
2 2 require 'digest/sha2'
3 3
4 4 module SHA512Constants
2  library/matrix/eigenvalue_decomposition/eigenvalue_matrix_spec.rb
@@ -8,4 +8,4 @@
8 8 Matrix[[1, 1], [-1, 1]].eigensystem.eigenvalue_matrix.should == Matrix[[Complex(1,1), 0],[0, Complex(1,-1)]]
9 9 end
10 10 end
11   -end
  11 +end
2  library/matrix/eigenvalue_decomposition/eigenvalues_spec.rb
@@ -21,4 +21,4 @@
21 21 [ 2, 6 ]
22 22 end
23 23 end
24   -end
  24 +end
2  library/matrix/eigenvalue_decomposition/eigenvector_matrix_spec.rb
@@ -19,4 +19,4 @@
19 19 [-0.7071067811865475, 0.7071067811865475]]
20 20 end
21 21 end
22   -end
  22 +end
2  library/matrix/eigenvalue_decomposition/eigenvectors_spec.rb
@@ -21,4 +21,4 @@
21 21 ]
22 22 end
23 23 end
24   -end
  24 +end
2  library/matrix/eigenvalue_decomposition/initialize_spec.rb
@@ -18,4 +18,4 @@
18 18 }.should raise_error(Matrix::ErrDimensionMismatch)
19 19 end
20 20 end
21   -end
  21 +end
2  library/matrix/eigenvalue_decomposition/to_a_spec.rb
@@ -17,4 +17,4 @@
17 17 (v * d * v_inv).map{|e| e.round(10)}.should == @a
18 18 end
19 19 end
20   -end
  20 +end
2  library/matrix/fixtures/classes.rb
@@ -4,4 +4,4 @@ class MatrixSub < Matrix
4 4 def self.ins
5 5 rows([[1, 0], [0, 1]])
6 6 end
7   -end
  7 +end
2  library/matrix/lup_decomposition/initialize_spec.rb
@@ -12,4 +12,4 @@
12 12 }.should raise_error(TypeError)
13 13 end
14 14 end
15   -end
  15 +end
2  library/matrix/lup_decomposition/l_spec.rb
@@ -17,4 +17,4 @@
17 17 @l.lower_triangular?.should be_true
18 18 end
19 19 end
20   -end
  20 +end
2  library/matrix/lup_decomposition/to_a_spec.rb
@@ -22,4 +22,4 @@
22 22
23 23 it "has other properties implied by the specs of #l, #u and #p"
24 24 end
25   -end
  25 +end
2  library/matrix/lup_decomposition/u_spec.rb
@@ -17,4 +17,4 @@
17 17 @u.upper_triangular?.should be_true
18 18 end
19 19 end
20   -end
  20 +end
2  library/matrix/round_spec.rb
@@ -22,4 +22,4 @@
22 22 end
23 23 end
24 24 end
25   -end
  25 +end
2  library/openssl/shared/constants.rb
... ... @@ -1,4 +1,4 @@
1   -# -*- coding: US-ASCII -*-
  1 +# -*- encoding: US-ASCII -*-
2 2 module HMACConstants
3 3
4 4 Contents = "Ipsum is simply dummy text of the printing and typesetting industry. \nLorem Ipsum has been the industrys standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. \nIt has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. \nIt was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum."
2  library/openssl/x509/name/parse_spec.rb
@@ -45,4 +45,4 @@
45 45 OpenSSL::X509::Name.parse("hello=goodbye")
46 46 end.should raise_error(OpenSSL::X509::NameError)
47 47 end
48   -end
  48 +end
2  library/socket/basicsocket/recv_spec.rb
... ... @@ -1,4 +1,4 @@
1   -# -*- coding: US-ASCII -*-
  1 +# -*- encoding: US-ASCII -*-
2 2 require File.expand_path('../../../../spec_helper', __FILE__)
3 3 require File.expand_path('../../fixtures/classes', __FILE__)
4 4
2  library/socket/socket/gethostbyname_spec.rb
... ... @@ -1,4 +1,4 @@
1   -# -*- coding: US-ASCII -*-
  1 +# -*- encoding: US-ASCII -*-
2 2 require File.expand_path('../../../../spec_helper', __FILE__)
3 3 require File.expand_path('../../fixtures/classes', __FILE__)
4 4
2  library/stringio/external_encoding.rb
@@ -9,4 +9,4 @@
9 9 io.external_encoding.should == Encoding::UTF8
10 10 end
11 11 end
12   -end
  12 +end
2  library/stringio/internal_encoding.rb
@@ -9,4 +9,4 @@
9 9 io.internal_encoding.should == nil
10 10 end
11 11 end
12   -end
  12 +end
2  library/stringio/set_encoding.rb
@@ -9,4 +9,4 @@
9 9 io.string.encoding.should == Encoding::UTF8
10 10 end
11 11 end
12   -end
  12 +end
2  library/zlib/deflate/deflate_spec.rb
... ... @@ -1,4 +1,4 @@
1   -# -*- coding: US-ASCII -*-
  1 +# -*- encoding: US-ASCII -*-
2 2 require 'zlib'
3 3 require File.expand_path('../../../../spec_helper', __FILE__)
4 4
2  library/zlib/deflate/set_dictionary_spec.rb
... ... @@ -1,4 +1,4 @@
1   -# -*- coding: US-ASCII -*-
  1 +# -*- encoding: US-ASCII -*-
2 2 require File.expand_path('../../../../spec_helper', __FILE__)
3 3 require 'zlib'
4 4
2  library/zlib/inflate/append_spec.rb
... ... @@ -1,4 +1,4 @@
1   -# -*- coding: US-ASCII -*-
  1 +# -*- encoding: US-ASCII -*-
2 2 require File.expand_path('../../../../spec_helper', __FILE__)
3 3 require 'zlib'
4 4
2  library/zlib/inflate/inflate_spec.rb
... ... @@ -1,4 +1,4 @@
1   -# -*- coding: US-ASCII -*-
  1 +# -*- encoding: US-ASCII -*-
2 2 require 'zlib'
3 3 require File.expand_path('../../../../spec_helper', __FILE__)
4 4

0 comments on commit 764471e

Please sign in to comment.
Something went wrong with that request. Please try again.