summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/cgi/cookie.rb2
-rw-r--r--lib/rdoc/ruby_lex.rb2
-rw-r--r--lib/xmlrpc/parser.rb2
3 files changed, 4 insertions, 2 deletions
diff --git a/lib/cgi/cookie.rb b/lib/cgi/cookie.rb
index 513bd40989..97a92efc3a 100644
--- a/lib/cgi/cookie.rb
+++ b/lib/cgi/cookie.rb
@@ -54,6 +54,8 @@ class CGI
#
# These keywords correspond to attributes of the cookie object.
def initialize(name = "", *value)
+ @domain = nil
+ @expires = nil
if name.kind_of?(String)
@name = name
%r|^(.*/)|.match(ENV["SCRIPT_NAME"])
diff --git a/lib/rdoc/ruby_lex.rb b/lib/rdoc/ruby_lex.rb
index eda7b81e1f..59de6cc762 100644
--- a/lib/rdoc/ruby_lex.rb
+++ b/lib/rdoc/ruby_lex.rb
@@ -453,7 +453,7 @@ class RDoc::RubyLex
if @lex_state != EXPR_END && @lex_state != EXPR_CLASS &&
(@lex_state != EXPR_ARG || @space_seen)
c = peek(0)
- if /\S/ =~ c && (/["'`]/ =~ c || /[\w_]/ =~ c || c == "-")
+ if /\S/ =~ c && (/["'`]/ =~ c || /\w/ =~ c || c == "-")
tk = identify_here_document
end
end
diff --git a/lib/xmlrpc/parser.rb b/lib/xmlrpc/parser.rb
index d078de2f4b..d8e91b0098 100644
--- a/lib/xmlrpc/parser.rb
+++ b/lib/xmlrpc/parser.rb
@@ -133,7 +133,7 @@ module XMLRPC
hash.delete "___class___"
hash.each {|key, value|
- obj.instance_variable_set("@#{ key }", value) if key =~ /^([\w_][\w_0-9]*)$/
+ obj.instance_variable_set("@#{ key }", value) if key =~ /^([a-zA-Z_]\w*)$/
}
obj
rescue