diff --git a/aws.gemspec b/aws.gemspec
index 45124a6..7842539 100644
--- a/aws.gemspec
+++ b/aws.gemspec
@@ -5,7 +5,7 @@
Gem::Specification.new do |s|
s.name = %q{aws}
- s.version = "2.3.25"
+ s.version = "2.3.9999"
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Travis Reeder", "Chad Arimura", "RightScale"]
diff --git a/lib/awsbase/support.rb b/lib/awsbase/support.rb
index e0d409e..20ebc68 100644
--- a/lib/awsbase/support.rb
+++ b/lib/awsbase/support.rb
@@ -31,7 +31,9 @@
#
#
class String #:nodoc:
-
+ # Ruby 1.9 introduces an inherit argument for Module#const_get and
+ # #const_defined? and changes their default behavior.
+ if Module.method(:const_get).arity == 1
# Constantize tries to find a declared constant with the name specified
# in the string. It raises a NameError when the name is not in CamelCase
# or is not initialized.
@@ -40,17 +42,29 @@ class String #:nodoc:
# "Module".constantize #=> Module
# "Class".constantize #=> Class
def constantize()
- camel_cased_word = self
- names = camel_cased_word.split('::')
- names.shift if names.empty? || names.first.empty?
-
- constant = Object
- names.each do |name|
- constant = constant.const_get(name, false) || constant.const_missing(name)
- end
- constant
+ camel_cased_word = self
+ names = camel_cased_word.split('::')
+ names.shift if names.empty? || names.first.empty?
+
+ constant = Object
+ names.each do |name|
+ constant = constant.const_defined?(name) ? constant.const_get(name) : constant.const_missing(name)
+ end
+ constant
end
-
+ else
+ def constantize() #:nodoc:
+ camel_cased_word = self
+ names = camel_cased_word.split('::')
+ names.shift if names.empty? || names.first.empty?
+
+ constant = Object
+ names.each do |name|
+ constant = constant.const_get(name, false) || constant.const_missing(name)
+ end
+ constant
+ end
+ end
end
diff --git a/lib/s3/right_s3_interface.rb b/lib/s3/right_s3_interface.rb
index a4cb932..67c65d5 100644
--- a/lib/s3/right_s3_interface.rb
+++ b/lib/s3/right_s3_interface.rb
@@ -204,7 +204,9 @@ def list_all_my_buckets(headers={})
def create_bucket(bucket, headers={})
data = nil
unless headers[:location].blank?
- data = "#{headers[:location].to_s.upcase}"
+ location = "#{headers[:location]}"
+ location.upcase! if location == 'eu'
+ data = "#{location}"
end
req_hash = generate_rest_request('PUT', headers.merge(:url=>bucket, :data => data))
request_info(req_hash, RightHttp2xxParser.new)
diff --git a/pkg/aws-2.3.9999.gem b/pkg/aws-2.3.9999.gem
new file mode 100644
index 0000000..861483c
Binary files /dev/null and b/pkg/aws-2.3.9999.gem differ