summaryrefslogtreecommitdiff
path: root/lib/irb/locale.rb
AgeCommit message (Collapse)Author
2020-01-14Use Reline.encoding_system_needs if existsaycabta
2019-11-25Cache loaded module to suppress method redefined warningsaycabta
2017-12-12Add uplevel keyword to Kernel#warn and use itshyouhei
If uplevel keyword is given, the warning message is prepended with caller file and line information and the string "warning: ". The use of the uplevel keyword makes Kernel#warn format output similar to how rb_warn formats output. This patch modifies net/ftp and net/imap to use Kernel#warn instead of $stderr.puts or $stderr.printf, since they are used for printing warnings. This makes lib/cgi/core and tempfile use $stderr.puts instead of warn for debug logging, since they are used for debug printing and not for warning. This does not modify bundler, rubygems, or rdoc, as those are maintained outside of ruby and probably wish to remain backwards compatible with older ruby versions. rb_warn_m code is originally from nobu, but I've changed it so that it only includes the path and lineno from uplevel (not the method), and also prepends the string "warning: ", to make it more similar to rb_warn. From: Jeremy Evans code@jeremyevans.net Signed-off-by: Urabe Shyouhei shyouhei@ruby-lang.org git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61155 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-16Add frozen_string_literal: false for all filesnaruse
When you change this to true, you may need to add more tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-24* lib/e2mmap.rb: remove needless instance variables.hsbt
* lib/irb.rb: ditto. * lib/irb/**/*.rb: ditto. * lib/shell.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47266 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-09* lib/cmath.rb: fixed indent.hsbt
* lib/drb/ssl.rb: ditto. * lib/irb/**/*.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47112 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-04lib/irb/locale.rb: fix typonobu
* lib/irb/locale.rb (IRB::Locale#modifier): fix wrong attr_reader `modifieer` => `modifier` from irb locale. [fix GH-656] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46700 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-13* lib/irb*: merge doc from doc/irb/ird.rd and improve overallzzak
documentation of IRB * doc/irb/irb.rd: remove stale documentation git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38358 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-15* remove trailing spaces.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31573 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-31* lib/irb/locale.rb (IRB::Locale::#search_file):yugui
Gem might be undefined if --disable-gems. [ruby-core:34990] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30741 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-09* lib/irb/locale.rb (IRB::Locale::LOCALE_NAME_RE):yugui
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
2011-01-05* lib/irb/locale.rb (IRB::Locale#search_file): make it possibleyugui
to load a localization from a gem. (IRB::Locale#lc_path): obsoleted because of the change of #search_file (IRB::Locale#each_localized_path): new private method, based on lc_path (IRB::Locale#find): follows the change of #search_file. (IRB::Locale#load): removed duplicate with #find. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30448 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-07 * bin/irb, lib/irb.rb lib/irb/*: irb-0.9.6, extend inspect-modekeiju
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23985 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-06* {ext,lib,test}/**/*.rb: removed trailing spaces.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-20* lib/irb/locale.rb (IRB::Locale#initialize)yugui
initializes instance variables to suppress warnings. typo fix to ignore LoadError: [ruby-dev:37508] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20887 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-18* lib/irb/init.rb (IRB.opt_parse): (M17N) adds -U and -E as commandyugui
line options. [ruby-dev:37161]. Fixes #711. improved long optinos. * lib/irb/init.rb (IRB.set_encoding): new subroutine for IRB.opt_parse * lib/irb/input-method.rb (IRB::StdioInputMethod): (M17N) regards scripts that user types as encoded in the external_encoding. * lib/irb/input-method.rb (IRB::ReadlineInputMethod): ditto. * lib/irb/input-method.rb (IRB::FileInputMethod): (M17N) respects magic comment. * lib/irb/help.rb (IRB.print_usage): (M17N) respects magic comment in the resource file. * lib/irb/lc/help-message: adds -U and -E. * lib/irb/lc/ja/help-message: ditto. re-encoded from ISO-2022-JP into UTF-8. * lib/irb/lc/ja/encoding_aliases.rb: new file. provides Japanese specific character encoding name table for backward compatibility. * lib/irb/lc/ja/error.rb: re-eoncoded from ISO-2022-JP into UTF-8. magic comment. * lib/irb/locale.rb: integrated with Ruby 1.9's M17N support. * lib/irb/magic-file.rb: new file. utility to handle files with magic comment and opens in the correct encoding. * lib/irb/ruby-lex.rb (RubyLex#each_top_level_statement): recovers character encoding for a statement after it lexed so that irb can eval the statement in correct encoding. * lib/irb/src_encoding.rb: new file. utility. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20862 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-18* lib/irb/locale.rb (IRB::Locale#lc2kconv): check ja_JP.EUC-JP as well.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15536 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-06* $Date$ keyword removed to avoid inclusion of locale dependentakr
string. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14912 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-12-14* lib/irb/locale.rb (IRB::Locale::puts): typo fixed. a patch frommatz
NAKAMURA Usaku <usa@ruby-lang.org>. [ruby-dev:30012] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11383 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-12-09* lib/irb/locale.rb (IRB::Locale::search_file): ues File.exist?matz
instead of File.exists?. [ruby-dev:30000] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11370 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-08-26* lib/irb/init.rb: make IRB -I option that is same befavior for ruby.keiju
[ruby-dev:26872] * lib/irb/locale.rb: support to print help message when OS locale is ja_JP.utf-8. [ruby-dev:26872] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9031 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-04-13 * bin/irb lib/irb.rb lib/irb/...: IRB 0.9.5.keiju
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8322 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-01-16* ext/readline/readline.c: suppress warnings.nobu
* lib/irb/extend-command.rb (IRB::ContextExtender.def_extend_command): ditto. * lib/irb/ext/history.rb (IRB::Context::set_last_value): ditto. * lib/irb/ext/history.rb (IRB::Context::eval_history): ditto. * lib/irb/locale.rb (IRB::Locale::real_load): ditto. * lib/irb/slex.rb (SLex::Node::create_subnode): remove garbage. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7781 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-24* eval.c (thgroup_add): no warning for terminated threads.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4142 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-11-22* file.c (rb_find_file_ext): should not terminate searching withmatz
empty path, just ignore. * dir.c: remove <sys/parm.h> inclusion. * compar.c (cmp_eq,cmp_gt,cmp_ge,cmp_lt,cmp_le): check using rb_cmpint(). * error.c (init_syserr): remove sys_nerr dependency. * numeric.c (num_cmp): added to satisfy Comparable assumption. * eval.c (rb_add_method): "initialize" should be public if it is a singleton method. * regex.c (re_match): avoid dereferencing if size == 0. (ruby-bugs-ja:PR#360) * time.c (time_cmp): should return nil if an operand is not a number nor time. (ruby-bugs-ja:PR#359) * file.c (rb_stat_cmp): should return nil if an operand is not File::Stat. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3076 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-07-09* irb 0.9keiju
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2627 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-06-27* lib/matrix.rb: resolve 'ruby -w' warnings.keiju
* lib/irb/locale.rb: resolve 'ruby -w' warnings. * lib/irb/multi-irb.rb: resolve 'ruby -w' warnings. * lib/irb/ruby-lex.rb: fix problem for "\\M-\\..." and "\\C-\\..." and resolve 'ruby -w' warnings. * lib/irb/ruby-token.rb: fix typo * lib/shell/command-processor.rb: resolve 'ruby -w' warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1550 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-06-22* lib/irb/locale.rb: fix for require "kconv" problemkeiju
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1537 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-04-30Initial revisionknu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1337 b2dd03c8-39d4-4d8f-98ff-823fe69b080e