summaryrefslogtreecommitdiff
path: root/lib/yaml.rb
AgeCommit message (Collapse)Author
2019-08-19Update the canonical repository urlHiroshi SHIBATA
2018-03-02Clarify the documentation of the YAML module [Misc #14567]eregon
Based on a patch from Victor Shepelev git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62635 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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
2015-05-03* lib/yaml.rb: fix typo. [ci skip][fix GH-890]hsbt
Patch by @miketheman git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50422 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-26Revert "Revert "* lib/yaml.rb: Remove Psych::EngineManager [Bug #8344]""hsbt
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
2014-05-25Revert "* lib/yaml.rb: Remove Psych::EngineManager [Bug #8344]"naruse
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
2014-05-25* lib/yaml.rb: Remove Psych::EngineManager [Bug #8344]zzak
* test/psych/*: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46097 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-08* lib/yaml.rb: [DOC] Add links to syck and psych on github [Bug #9501]zzak
Based on a patch by Giorgos Tsiftsis [ci skip] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44893 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-12* lib/yaml.rb, lib/yaml/: [DOC] Document YAML::DBM#key and addzzak
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
2013-07-18* lib/cgi.rb: [DOC] Capitalize "Ruby" in documentation [Fixes GH-341]zzak
Patch by Dave Worth https://github.com/ruby/ruby/pull/341 * lib/webrick.rb: ditto * lib/scanf.rb: ditto * lib/xmlrpc/config.rb: ditto * lib/resolv.rb: ditto * lib/e2mmap.rb: ditto * lib/fileutils.rb: ditto * lib/mkmf.rb: ditto * lib/cgi/session.rb: ditto * lib/yaml.rb: ditto * lib/erb.rb: ditto * lib/irb.rb: ditto * lib/tracer.rb: ditto * lib/net/http.rb: ditto * ext/syslog/lib/syslog/logger.rb: ditto * sample/pty/expect_sample.rb: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42045 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-02* lib/yaml.rb: nodoc EngineManager, add History doc #8344zzak
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40547 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-28* lib/yaml.rb: Clarify documentation about YAML being always Psych.eregon
Give a tip about using Syck. See #8344. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40516 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-28* lib/yaml.rb: Use another trick to define the YAML module.eregon
https://twitter.com/n0kada/status/328342207511801856 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40515 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-28* lib/yaml.rb: Disable setting YAML const twice [ruby-core:54642]zzak
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40509 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-27* lib/yaml.rb: add security warning to YAML documentationcharliesome
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40500 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-27* lib/yaml.rb: Documentation for YAML module [Bug #8213]zzak
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40499 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-03* lib/yaml.rb (YAML::EngineManager): Documentation for #yamler andzzak
#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
2012-08-22* ext/syck: removed. Fixes [ruby-core:43360]tenderlove
* 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
2011-09-07* lib/yaml.rb: explicitly specify ::Object to avoid the collision withnaruse
Syck::Object. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33208 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-30 * lib/yaml.rb: Document toplevel YAML and YAML::ENGINE to describedrbrain
Psych vs Syck engines. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32313 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-13* lib/yaml.rb: load psych only when syck is not loaded.naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32044 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-23* lib/yaml.rb: switch default YAML engine to Psych, old syck enginetenderlove
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
2010-04-08* lib/yaml.rb: use Psych if only it is loaded already.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27257 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-08* lib/yaml.rb (YAML::EngineManager#yamler): set the result afternobu
successfully switched. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27256 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-03* lib/yaml: Moved to ext/syck/lib, Syck only uses Syck constant.tenderlove
* 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
2010-03-26* lib/yaml.rb: adding deprecation notices to YAML methodstenderlove
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27060 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-22* ext/syck/rubyext.c (id_hash_new): new function to create a hashakr
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
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-09-23Fix ruby -w warnings for mismatched indentation discovered by rdocdrbrain
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19495 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-15* lib/yaml.rb (quick_emit): use combination of object_id and hash towhy
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
2005-12-29* eval.c (rb_mod_define_method): should save safe_level in thematz
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
2005-11-06* lib/yaml.rb: removed :nodoc: to generate Kernel doc. [ruby-core:6324]ocean
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9510 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-10-05* range.c (rb_range_beg_len): should return Qfalse for non-rangematz
object. * pack.c (EXTEND16): [ruby-dev:27383] * eval.c (set_trace_func): add rb_secure(4) to prevent adding tracing function. * lib/delegate.rb: document update from James Edward Gray II <james@grayproductions.net>. [ruby-core:05942] * process.c (proc_daemon): should restrict execution on levels higher than $SAFE=2. suggested by URABE Shyouhei <shyouhei@ice.uec.ac.jp>. * lib/forwardable.rb: replaced by new implementation from <Daniel.Berger@qwest.com>. [ruby-core:05899] * file.c (path_check_0): disallow sticky world writable directory in PATH (and $LOAD_PATH). [ruby-dev:27226] * numeric.c (fix_idiv): 1.div(1.0) should return integer value. [ruby-dev:27235] * lib/yaml.rb: require 'yaml/constants'. [ruby-core:5776] * lib/xmlrpc/client.rb (XMLRPC::Client::do_rpc): add charset information to content-type header.[ruby-core:5127] * lib/xmlrpc/server.rb (CGIServer::serve): ditto. * lib/xmlrpc/server.rb (ModRubyServer::serve): ditto. * lib/xmlrpc/server.rb (WEBrickServlet::service): ditto. * test/dbm/test_dbm.rb (TestDBM::test_s_open_error): remove test_s_open_error test to detect duplicate open. [ruby-dev:27202] * eval.c (splat_value): use to_a to splat non Array object. * object.c (nil_to_a): remove nil.to_a. [experimental] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9349 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-09-13* lib/yaml.rb: reworking YAML::Stream to use the newwhy
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
2005-01-07* lib/yaml.rb: Kernel#y requires an argument.why
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7747 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-07-15* lib/yaml.rb (YAML::load_file, YAML::parse_file): added.why
* ext/syck/token.c: re2c compiled with bit vectors now. * ext/syck/implicit.c: ditto. * ext/syck/bytecode.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6634 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-05-18* lib/yaml.rb: added rdoc to beginning of lib.why
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6358 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-05-18* lib/yaml.rb: added rdoc to beginning of lib.why
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6357 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-05-15* lib/yaml.rb: removed fallback to pure Ruby parser.why
* lib/yaml/baseemitter.rb (node_text): rewriting folded scalars. * ext/syck/syck.h: reports style of scalars now, be they plain, block single-, or double-quoted. * ext/syck/syck.c: ditto. * ext/syck/gram.c: ditto. * ext/syck/node.c: ditto. * ext/syck/token.c: ditto. * ext/syck/rubyext.c (yaml_org_handler): symbols loaded only if scalar style is plain. * test/yaml/test_yaml.rb (test_perl_regexp): updated test to match new regexp serialization. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6315 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-05-06* lib/yaml/rubytypes.rb (to_yaml): added instance variable handlingwhy
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
2004-04-18* dln.c, io.c, pack.c, lib/benchmark.rb, lib/cgi.rb, lib/csv.rb,nobu
lib/date.rb, lib/ftools.rb, lib/getoptlong.rb, lib/logger.rb, lib/matrix.rb, lib/monitor.rb, lib/set.rb, lib/thwait.rb, lib/timeout.rb, lib/yaml.rb, lib/drb/drb.rb, lib/irb/workspace.rb, lib/net/ftp.rb, lib/net/http.rb, lib/net/imap.rb, lib/net/pop.rb, lib/net/telnet.rb, lib/racc/parser.rb, lib/rinda/rinda.rb, lib/rinda/tuplespace.rb, lib/shell/command-processor.rb, lib/soap/rpc/soaplet.rb, lib/test/unit/testcase.rb, lib/test/unit/testsuite.rb: typo fix. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6178 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-04-02* ext/syck/lib/gram.c: allow root-level inline collections.why
[ruby-talk:94922] * lib/yaml/rubytypes.rb (Symbol#to_yaml): emit symbols as implicits. [ruby-talk:94930] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6079 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-03-24Move "y" documentation to correct placedave
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6017 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-20* lib/yaml.rb (YAML::YAML): adjust Marshal version.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5227 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-11* ext/syck/emitter.c: new emitter code.why
* ext/syck/rubyext.c: Emitter class. * lib/yaml.rb: Load Syck emitter, if available. * lib/yaml/stream.rb: ditto. * lib/yaml/baseemitter.rb: underlying class for all emitters. * lib/yaml/rubytypes.rb: use BaseEmitter abstraction. * lib/yaml/emitter.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4066 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-06-18* ext/syck/rubyext.c (rb_syck_load_handler): merge key implemented.why
* ext/syck/rubyext.c (transfer_find_i): removed use of String#=~ in favor of Regexp#match. * lib/yaml.rb: YAML::try_implicit returns. * lib/yaml/rubytypes.rb: Regexps added for type matching. * lib/yaml/emitter.rb: fix String + nil error. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3955 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-06-05* ext/syck/rubyext.c (syck_parser_mark): was a bit heavy on the GC.why
* lib/yaml.rb (YAML::transfer): added. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3912 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-05-22* lib/token.c: single- and double-quoted root-level fix.why
* 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
2003-05-14* ext/syck/gram.c: sequence-in-map shortcut, transfer methods onwhy
sequence-in-sequence, memory leak in mapping merge. [0.28] * ext/syck/syck.c: memory leak in domain anchoring. [0.28] * lib/yaml/rubytypes.rb, lib/yaml/types.rb: eliminated 1.6.x code. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3795 b2dd03c8-39d4-4d8f-98ff-823fe69b080e