* lib/irb/locale.rb (IRB::Locale::LOCALE_NAME_RE):
some platoform has a locale without territory but with encoding. (#each_sub_locale): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30498 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
0c560941f1
commit
b128f7ffcd
@ -1,3 +1,10 @@
|
|||||||
|
Sun Jan 9 16:31:34 2011 Yuki Sonoda (Yugui) <yugui@yugui.jp>
|
||||||
|
|
||||||
|
* lib/irb/locale.rb (IRB::Locale::LOCALE_NAME_RE):
|
||||||
|
some platoform has a locale without territory but with
|
||||||
|
encoding.
|
||||||
|
(#each_sub_locale): ditto.
|
||||||
|
|
||||||
Sun Jan 9 14:47:50 2011 TAKAO Kouji <kouji@takao7.net>
|
Sun Jan 9 14:47:50 2011 TAKAO Kouji <kouji@takao7.net>
|
||||||
|
|
||||||
* ext/readline/readline.c: apply a patch from Nobuyoshi Nakada.
|
* ext/readline/readline.c: apply a patch from Nobuyoshi Nakada.
|
||||||
|
@ -13,16 +13,10 @@ module IRB
|
|||||||
@RCS_ID='-$Id$-'
|
@RCS_ID='-$Id$-'
|
||||||
|
|
||||||
LOCALE_NAME_RE = %r[
|
LOCALE_NAME_RE = %r[
|
||||||
(?<language>[[:alpha:]]{2})
|
(?<language>[[:alpha:]]{2,3})
|
||||||
(?:_
|
(?:_ (?<territory>[[:alpha:]]{2,3}) )?
|
||||||
(?<territory>[[:alpha:]]{2,3})
|
(?:\. (?<codeset>[^@]+) )?
|
||||||
(?:\.
|
(?:@ (?<modifier>.*) )?
|
||||||
(?<codeset>[^@]+)
|
|
||||||
)?
|
|
||||||
)?
|
|
||||||
(?:@
|
|
||||||
(?<modifier>.*)
|
|
||||||
)?
|
|
||||||
]x
|
]x
|
||||||
LOCALE_DIR = "/lc/"
|
LOCALE_DIR = "/lc/"
|
||||||
|
|
||||||
@ -175,6 +169,10 @@ module IRB
|
|||||||
yield "#{@lang}_#{@territory}@#{@modifier}" if @modifier
|
yield "#{@lang}_#{@territory}@#{@modifier}" if @modifier
|
||||||
yield "#{@lang}_#{@territory}"
|
yield "#{@lang}_#{@territory}"
|
||||||
end
|
end
|
||||||
|
if @encoding_name
|
||||||
|
yield "#{@lang}.#{@encoding_name}@#{@modifier}" if @modifier
|
||||||
|
yield "#{@lang}.#{@encoding_name}"
|
||||||
|
end
|
||||||
yield "#{@lang}@#{@modifier}" if @modifier
|
yield "#{@lang}@#{@modifier}" if @modifier
|
||||||
yield "#{@lang}"
|
yield "#{@lang}"
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user