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
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
syck-1.0.3 gem support this imcompatible changes.
This reverts commit r46102
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46559 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
zzak is not the maintainer of yaml.
This reverts commit r46097.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46102 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
references to similar methods with more detail. This patch brings
lib/yaml to 100% documentation coverage.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42529 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
#yamler= for using the removed Syck gem as the YAML::ENGINE
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39033 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/syck: removed.
* lib/yaml.rb: only require psych, show a warning if people try to set
the engine to syck.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36786 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
may be enabled via YAML::ENGINE.yamler = "syck". [ruby-core:36374]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31715 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/yaml.rb: Added an engine manager for choosing YAML engine.
* ext/syck/lib/syck/rubytypes.rb: squashed warnings when using Psych
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27212 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
which key is compared by object id.
(syck_parser_load): use id_hash_new for bonus->data.
(syck_parser_load_documents): ditto.
(syck_emitter_reset): ditto.
* lib/yaml.rb (YAML.quick_emit): give the object itself to eimitter.
don't use object_id and hash.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24625 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
identify repeated object references, since GC will reuse memory of
objects during output of YAML. [ruby-Bugs-8548] [ruby-Bugs-3698]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13940 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
proc object. [ruby-dev:28146]
* test/drb/drbtest.rb (DRbService::self.ext_service): increase
timeout limit. a patch from Kazuhiro NISHIYAMA
<zn at mbf.nifty.com>. [ruby-dev:28132]
* eval.c (ev_const_get): fixed a bug in constant reference during
instance_eval. [yarv-dev:707]
* eval.c (ev_const_defined): ditto.
* lib/yaml.rb (YAML::add_domain_type): typo fixed. a patch from
Joel VanderWerf <vjoel at path.berkeley.edu>.
[ruby-talk:165285] [ruby-core:6995]
* ext/digest/sha2/sha2.c (ULL): support AIX C. a patch from
Kailden <kailden at gmail.com>. [ruby-core:06984]
* ext/syck/rubyext.c (rb_syck_compile): avoid potential memory
leak.
* ext/syck/rubyext.c (syck_set_ivars): avoid potential memory
leak by explicit symbol allocation.
* lib/delegate.rb (Delegator::method_missing): should delegate
block as well.
* lib/cgi.rb (CGI::QueryExtension::MorphingBody): fix criteria to
use Tempfile. A fix from Zev Blut <rubyzbibd at ubit.com>.
[ruby-core:06076]
* string.c: remove global functions work on $_.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9757 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
emitter.
* lib/yaml/stream.rb: ditto.
* lib/yaml/rubytypes.rb: added Object#yaml_new.
* lib/yaml/tag.rb: the tag_subclasses? method now
shows up in the class. allow taguri to be set using an accessor.
continue support of Object#to_yaml_type.
* ext/syck/rubyext.c: new emitter code. yaml_new and yaml_initialize
get called, should they be present. consolidated all the diaspora of internal
node types into the family below YAML::Syck::Node -- Map,
Seq, Scalar -- all of whom are SyckNode structs pointing to
Ruby data. moved Object#yaml_new into the node_import and made it the
default behavior. the target_class is always called wih yaml_new, prepended
a parameter, which is the klass. loaded nodes through GenericResolver show their style.
new Resolver#tagurize converts type ids to taguris.
* ext/syck/implicit.re: were 'y' and 'n' seriously omitted??
* ext/syck/emitter.c: renovated emitter, walks the tree in advance.
consolidated redundant block_styles struct into
the scalar_style struct. (this means loaded nodes can now
be sent back to emitter and preserve at least its very basic
formatting.)
* ext/syck/gram.c: headless documents of any kind allowed.
* ext/syck/node.c: new syck_replace_str methods and syck_empty_*
methods for rewriting node contents, while keeping the ID
and other setup info. added syck_seq_assign.
* ext/syck/syck.h: reflect block_styles and new node functions.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
for Ranges, Strings, Structs, Regexps.
* lib/yaml/rubytypes.rb (to_yaml_fold): new method for setting a
String's flow style.
* lib/yaml.rb (YAML::object_maker): now uses Object.allocate.
* ext/syck/gram.c: fixed transfer methods on structs, broke it
last commit.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6252 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/yaml.rb (YAML::object_maker): can create object attributes (such as
found in Exception class)
* lib/yaml/rubytypes.rb: roundtripping of Exception and subclasses.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3856 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/yaml.rb: YAML::detect_implicit will discover typing for a Ruby string
* ext/syck/: Fixed portable comments, misuse of NULL and methods without return VALUEs.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
ext/syck/node.c ext/syck/rubyext.c ext/syck/syck.c
ext/syck/syck.h ext/syck/token.c: updated to Syck 0.27
* lib/yaml/loader.rb: new YAML::Loader class
* lib/yaml.rb: loading of type families leverages YAML::DefaultLoader
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3778 b2dd03c8-39d4-4d8f-98ff-823fe69b080e