summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--lib/un.rb7
-rw-r--r--version.h4
3 files changed, 11 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index b3b488e41e..c294886ef4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Fri Jun 25 05:49:14 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * lib/un.rb (setup): fix of word splitting. [ruby-dev:41723]
+
Wed Jun 16 01:38:40 2010 Yusuke Endoh <mame@tsg.ne.jp>
* ext/fiddle/extconf.rb: check ffi.h even when pkg-config succeeded.
diff --git a/lib/un.rb b/lib/un.rb
index 24c6024c71..907b80c0ab 100644
--- a/lib/un.rb
+++ b/lib/un.rb
@@ -43,8 +43,11 @@ def setup(options = "", *long_options)
end
end
long_options.each do |s|
- opt_name = s[/\A(?:--)?([^\s=]+)/, 1].intern
- o.on(s.gsub(/([a-z])([A-Z])/){$1+"-"+$2.downcase}.sub(/\A(?!--)/, '--')) do |val|
+ opt_name, arg_name = s.split(/(?=[\s=])/, 2)
+ opt_name.sub!(/\A--/, '')
+ s = "--#{opt_name.gsub(/([A-Za-z]+)([A-Z])/, '\1-\2').downcase}#{arg_name}"
+ opt_name = opt_name.intern
+ o.on(s) do |val|
opt_hash[opt_name] = val
end
end
diff --git a/version.h b/version.h
index 2f62d76ba4..fdd4514b3c 100644
--- a/version.h
+++ b/version.h
@@ -1,5 +1,5 @@
#define RUBY_VERSION "1.9.2"
-#define RUBY_RELEASE_DATE "2010-06-24"
+#define RUBY_RELEASE_DATE "2010-06-25"
#define RUBY_PATCHLEVEL -1
#define RUBY_VERSION_MAJOR 1
@@ -7,7 +7,7 @@
#define RUBY_VERSION_TEENY 1
#define RUBY_RELEASE_YEAR 2010
#define RUBY_RELEASE_MONTH 6
-#define RUBY_RELEASE_DAY 24
+#define RUBY_RELEASE_DAY 25
#include "ruby/version.h"