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

231 commits

Author SHA1 Message Date
卜部昌平
5c167a9778 ruby tool/update-deps --fix 2021-10-05 14:18:23 +09:00
卜部昌平
6413dc27dc dependency updates 2021-04-13 14:30:21 +09:00
Shugo Maeda
5de38c41ae
ripper: fix a bug of Ripper::Lexer with syntax error and heredoc [Bug ] 2021-02-19 16:40:29 +09:00
manga_osyo
b84b253a69 Fix Ripper with heredoc. 2021-01-17 12:58:13 +09:00
Nobuyoshi Nakada
433a3be86a
ripper: call #pretty_print on also state 2021-01-04 23:37:00 +09:00
Nobuhiro IMAI
e33eb09b76 ripper: fix #tok on some error events [Bug 17345]
sorting alias target by event arity, and setup suitable `Elem` for error.
2020-12-19 17:32:39 +09:00
Nobuyoshi Nakada
e0bdd54348 Ripper: Refined error callbacks [Bug ] 2020-12-15 21:36:23 +09:00
Nobuyoshi Nakada
7898f4243f
ripper: return pushed new token instead of the token list 2020-12-15 10:26:50 +09:00
Nobuyoshi Nakada
f5ca3ff4db
Store all kinds of syntax errors [Bug ] 2020-11-26 20:14:34 +09:00
Nobuhiro IMAI
4f5d14eb8c [DOC] Ripper.{lex,tokenize} now always return full tokens. [ci skip] 2020-11-20 15:46:17 -08:00
Nobuyoshi Nakada
69d871eeeb
[Feature ] Moved raise_errors support to Ripper::Lexer#parse 2020-11-20 17:18:27 +09:00
Nobuhiro IMAI
1800f3fa5c
Ripper.{lex,tokenize} return full tokens even if syntax error
yet another implements [Feature ]
2020-11-20 11:44:57 +09:00
Jeremy Evans
1301bd8ca9 Update documentation for Ripper.{lex,tokenize,sexp,sexp_raw} [ci skip] 2020-11-17 21:26:56 -08:00
Jeremy Evans
cd0877a93e
Support raise_errors keyword for Ripper.{lex,tokenize,sexp,sexp_raw}
Implements [Feature ]
2020-11-17 21:15:50 -08:00
Koichi Sasada
5e3259ea74 fix public interface
To make some kind of Ractor related extensions, some functions
should be exposed.

* include/ruby/thread_native.h
  * rb_native_mutex_*
  * rb_native_cond_*
* include/ruby/ractor.h
  * RB_OBJ_SHAREABLE_P(obj)
  * rb_ractor_shareable_p(obj)
  * rb_ractor_std*()
  * rb_cRactor

and rm ractor_pub.h
and rename srcdir/ractor.h to srcdir/ractor_core.h
    (to avoid conflict with include/ruby/ractor.h)
2020-11-18 03:52:41 +09:00
Koichi Sasada
79df14c04b Introduce Ractor mechanism for parallel execution
This commit introduces Ractor mechanism to run Ruby program in
parallel. See doc/ractor.md for more details about Ractor.
See ticket [Feature ] to see the implementation details
and discussions.

[Feature ]

This commit does not complete the implementation. You can find
many bugs on using Ractor. Also the specification will be changed
so that this feature is experimental. You will see a warning when
you make the first Ractor with `Ractor.new`.

I hope this feature can help programmers from thread-safety issues.
2020-09-03 21:11:06 +09:00
卜部昌平
490010084e sed -i '/rmodule.h/d' 2020-08-27 16:42:06 +09:00
卜部昌平
756403d775 sed -i '/r_cast.h/d' 2020-08-27 15:03:36 +09:00
卜部昌平
0da2a3f1fc sed -i '\,2/extern.h,d' 2020-08-27 14:07:49 +09:00
Nobuyoshi Nakada
d32e2bb02d
Allow references to $$ in Ripper DSL 2020-05-29 09:41:27 +09:00
卜部昌平
9e41a75255 sed -i 's|ruby/impl|ruby/internal|'
To fix build failures.
2020-05-11 09:24:08 +09:00
卜部昌平
d7f4d732c1 sed -i s|ruby/3|ruby/impl|g
This shall fix compile errors.
2020-05-11 09:24:08 +09:00
Nobuyoshi Nakada
b7e1eda932
Suppress warnings by gcc 10.1.0-RC-20200430
* Folding results should not be empty.

  If `OnigCodePointCount(to->n)` were 0, `for` loop using `fn`
  wouldn't execute and `ncs` elements are not initialized.

  ```
  enc/unicode.c:557:21: warning: 'ncs[0]' may be used uninitialized in this function [-Wmaybe-uninitialized]
    557 |  for (i = 0; i < ncs[0]; i++) {
        |                  ~~~^~~
  ```

* Cast to `enum yytokentype`

  Additional enums for scanner events by ripper are not included
  in `yytokentype`.

  ```
  ripper.y:7274:28: warning: implicit conversion from 'enum <anonymous>' to 'enum yytokentype' [-Wenum-conversion]
  ```
2020-05-04 12:28:24 +09:00
卜部昌平
9e6e39c351
Merge pull request from shyouhei/ruby.h
Split ruby.h
2020-04-08 13:28:13 +09:00
Hiroshi SHIBATA
05485868cb Workaround for bison provided by scoop on mswin environment 2020-02-15 21:20:25 +09:00
Jeremy Evans
9f99760daf
Get rid of use of special variables
Use `"\n"` and `IO#fileno` instead of `$/` and `$.` respectively.
[Feature ]
2020-01-20 16:58:58 +09:00
Kazuhiro NISHIYAMA
4e6bcac23e
Update dependencies in makefiles again
patch from https://travis-ci.org/ruby/ruby/jobs/638231960
2020-01-17 11:19:01 +09:00
Nobuyoshi Nakada
179e402d8a
Updated dependencies on internal/warnings.h
Needed for `UNALIGNED_MEMBER_ACCESS` using `COMPILER_WARNING_`*
macros.
2019-12-31 11:14:19 +09:00
卜部昌平
0c2d731ef2 update dependencies 2019-12-26 20:45:12 +09:00
Nobuyoshi Nakada
265b5382b2
Allow $10 and more in the Ripper DSL 2019-11-26 21:57:00 +09:00
Nobuyoshi Nakada
e1b2341488
Update dependencies 2019-11-18 23:16:22 +09:00
Yuichiro Kaneko
ae33f93836 Update comment of Ripper.lex
This is follow up of 1f7cb4bee9.
2019-11-13 09:50:58 +09:00
Nobuyoshi Nakada
fb6a489af2
Revert "Method reference operator"
This reverts commit 67c5747369.
[Feature ]
2019-11-12 17:24:48 +09:00
David Rodríguez
f48655d04d Remove unneeded exec bits from some files
I noticed that some files in rubygems were executable, and I could think
of no reason why they should be.

In general, I think ruby files should never have the executable bit set
unless they include a shebang, so I run the following command over the
whole repo:

```bash
find . -name '*.rb' -type f -executable -exec bash -c 'grep -L "^#!" $1 || chmod -x $1' _ {} \;
```
2019-11-09 21:36:30 +09:00
Nobuyoshi Nakada
d62abc47c8
Suppress unused variable warning 2019-11-07 23:33:45 +09:00
git
215e4b8721 * expand tabs. [ci skip]
Tabs were expanded because previously the file did not have any tab indentation.
Please update your editor config, and use misc/expand_tabs.rb in the pre-commit hook.
2019-10-21 11:50:44 +09:00
Nobuyoshi Nakada
44da5a1c87
Look up event ID offsets by token as index 2019-10-21 11:45:54 +09:00
Nobuyoshi Nakada
ca7de0334d
Also BDOT2 and BDOT3 are operators 2019-10-20 20:45:56 +09:00
Nobuyoshi Nakada
1d435bd51a
Extend Ripper DSL to set to pseudo variables other than $$ 2019-10-19 17:19:27 +09:00
Nobuyoshi Nakada
ea68bb914a Changed numbered parameter prefix 2019-09-24 21:57:54 +09:00
Kazuhiro NISHIYAMA
f223ab47e6
[DOC] Update output of Ripper.sexp [ci skip] 2019-09-07 13:50:05 +09:00
Nobuyoshi Nakada
2ed68d0ff9
Revert "Add pipeline operator [Feature ]"
This reverts commits:
* d365fd5a02
* d780c36624
* aa7211836b
* 043f010c28
* bb4dd7c6af05c7821d572e2592ea3d0cc748d81f
* 043f010c28
* f169043d81

http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/94645
2019-08-29 15:27:59 +09:00
Yusuke Endoh
8877dbe400 ext/ripper/lib/ripper/lexer.rb: Consistently use Array#push
instead of <<.  All the other callsites use `push`.
2019-08-07 03:13:17 +09:00
Yusuke Endoh
ef8c5161b4 ext/ripper/lib/ripper/lexer.rb: fix a wrong delegation
The target method name is a typo.
2019-08-07 03:12:49 +09:00
Nobuyoshi Nakada
715955ff27
Include ruby/assert.h in ruby/ruby.h so that assertions can be there 2019-07-14 17:58:03 +09:00
Nobuyoshi Nakada
7b716bc52a
Show the parser states in pretty_print too 2019-06-27 16:58:06 +09:00
Nobuyoshi Nakada
801d0d9dd7
Support Bison 3 in ripper 2019-06-17 23:25:47 +09:00
Nobuyoshi Nakada
6fa4c90448
Prefer enum yytokentype to int 2019-06-15 11:58:02 +09:00
Nobuyoshi Nakada
f169043d81
Add pipeline operator [Feature ] 2019-06-13 18:44:32 +09:00
Nobuyoshi Nakada
9593e76ac2
Ripper::Lexer: fallback parse error token to the previous one 2019-06-12 15:25:06 +09:00