Skip to content
This repository
Browse code

fix typos

  • Loading branch information...
commit 3ee561469dd61cc7776af4eeb06b97dcbf98f39b 1 parent a210145
Vipul A M authored April 13, 2013
2  SPEC
@@ -207,7 +207,7 @@ but only contain keys that consist of
207 207
 letters, digits, <tt>_</tt> or <tt>-</tt> and start with a letter.
208 208
 The values of the header must be Strings,
209 209
 consisting of lines (for multiple header values, e.g. multiple
210  
-<tt>Set-Cookie</tt> values) seperated by "\n".
  210
+<tt>Set-Cookie</tt> values) separated by "\n".
211 211
 The lines must not contain characters below 037.
212 212
 === The Content-Type
213 213
 There must not be a <tt>Content-Type</tt>, when the +Status+ is 1xx,
2  lib/rack/backports/uri/common_18.rb
@@ -46,7 +46,7 @@ def self.encode_www_form_component(s)
46 46
 
47 47
   # Decode given +str+ of URL-encoded form data.
48 48
   #
49  
-  # This decods + to SP.
  49
+  # This decodes + to SP.
50 50
   #
51 51
   # See URI.encode_www_form_component, URI.decode_www_form
52 52
   def self.decode_www_form_component(str, enc=nil)
8  lib/rack/deflater.rb
@@ -103,13 +103,13 @@ def initialize(body)
103 103
       end
104 104
 
105 105
       def each
106  
-        deflater = ::Zlib::Deflate.new(*DEFLATE_ARGS)
107  
-        @body.each { |part| yield deflater.deflate(part, Zlib::SYNC_FLUSH) }
108  
-        yield deflater.finish
  106
+        deflator = ::Zlib::Deflate.new(*DEFLATE_ARGS)
  107
+        @body.each { |part| yield deflator.deflate(part, Zlib::SYNC_FLUSH) }
  108
+        yield deflator.finish
109 109
         nil
110 110
       ensure
111 111
         @body.close if @body.respond_to?(:close)
112  
-        deflater.close
  112
+        deflator.close
113 113
       end
114 114
     end
115 115
   end
2  lib/rack/lint.rb
@@ -584,7 +584,7 @@ def check_headers(header)
584 584
         assert("a header value must be a String, but the value of " +
585 585
           "'#{key}' is a #{value.class}") { value.kind_of? String }
586 586
         ## consisting of lines (for multiple header values, e.g. multiple
587  
-        ## <tt>Set-Cookie</tt> values) seperated by "\n".
  587
+        ## <tt>Set-Cookie</tt> values) separated by "\n".
588 588
         value.split("\n").each { |item|
589 589
           ## The lines must not contain characters below 037.
590 590
           assert("invalid header value #{key}: #{item.inspect}") {
2  lib/rack/sendfile.rb
@@ -22,7 +22,7 @@ module Rack
22 22
   #
23 23
   # Nginx supports the X-Accel-Redirect header. This is similar to X-Sendfile
24 24
   # but requires parts of the filesystem to be mapped into a private URL
25  
-  # hierarachy.
  25
+  # hierarchy.
26 26
   #
27 27
   # The following example shows the Nginx configuration required to create
28 28
   # a private "/files/" area, enable X-Accel-Redirect, and pass the special
4  lib/rack/session/abstract/id.rb
@@ -289,7 +289,7 @@ def session_exists?(env)
289 289
           value && !value.empty?
290 290
         end
291 291
 
292  
-        # Session should be commited if it was loaded, any of specific options like :renew, :drop
  292
+        # Session should be committed if it was loaded, any of specific options like :renew, :drop
293 293
         # or :expire_after was given and the security permissions match. Skips if skip is given.
294 294
 
295 295
         def commit_session?(env, session, options)
@@ -386,7 +386,7 @@ def set_session(env, sid, session, options)
386 386
           raise '#set_session not implemented.'
387 387
         end
388 388
 
389  
-        # All thread safety and session destroy proceedures should occur here.
  389
+        # All thread safety and session destroy procedures should occur here.
390 390
         # Should return a new session id or nil if options[:drop]
391 391
 
392 392
         def destroy_session(env, sid, options)
4  lib/rack/utils.rb
@@ -203,7 +203,7 @@ def best_q_match(q_value_header, available_mimes)
203 203
     if //.respond_to?(:encoding)
204 204
       ESCAPE_HTML_PATTERN = Regexp.union(*ESCAPE_HTML.keys)
205 205
     else
206  
-      # On 1.8, there is a kcode = 'u' bug that allows for XSS otherwhise
  206
+      # On 1.8, there is a kcode = 'u' bug that allows for XSS otherwise
207 207
       # TODO doesn't apply to jruby, so a better condition above might be preferable?
208 208
       ESCAPE_HTML_PATTERN = /#{Regexp.union(*ESCAPE_HTML.keys)}/n
209 209
     end
@@ -348,7 +348,7 @@ def rfc2822(time)
348 348
     # of '% %b %Y'.
349 349
     # It assumes that the time is in GMT to comply to the RFC 2109.
350 350
     #
351  
-    # NOTE: I'm not sure the RFC says it requires GMT, but is ambigous enough
  351
+    # NOTE: I'm not sure the RFC says it requires GMT, but is ambiguous enough
352 352
     # that I'm certain someone implemented only that option.
353 353
     # Do not use %a and %b from Time.strptime, it would use localized names for
354 354
     # weekday and month.

0 notes on commit 3ee5614

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