1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* encoding.c (rb_primary_encoding): added Encoding.primary_encoding.

* parse.y (rb_parser_encoding): added.

* ruby.c (proc_options): added -E and --encoding options.

* ruby.c (process_options): set primary encoding from command line
  option if set, or source encoding.

* include/ruby/encoding.h (rb_enc_from_encoding,
  rb_get_primary_encoding, rb_set_primary_encoding): prototypes.

* include/ruby/node.h (rb_parser_encoding): prototype.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13729 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2007-10-16 20:07:20 +00:00
parent b06a606278
commit 3cd040b6ef
6 changed files with 108 additions and 11 deletions

View file

@ -99,5 +99,8 @@ int rb_enc_tolower(int c, rb_encoding *enc);
ID rb_intern3(const char*, long, rb_encoding*);
int rb_enc_symname_p(const char*, rb_encoding*);
int rb_enc_str_coderange(VALUE);
VALUE rb_enc_from_encoding(rb_encoding *enc);
VALUE rb_get_primary_encoding(void);
void rb_set_primary_encoding(VALUE encoding);
#endif /* RUBY_ENCODING_H */