<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/ruby-gems/method_source.git/lib, branch master</title>
<subtitle>github.com: banister/method_source
</subtitle>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/ruby-gems/method_source.git/'/>
<entry>
<title>Add MethodSource.clear_cache</title>
<updated>2021-11-17T03:44:30+00:00</updated>
<author>
<name>Yoshiyuki Hirano</name>
<email>yhirano@me.com</email>
</author>
<published>2021-11-17T03:25:47+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/ruby-gems/method_source.git/commit/?id=2d7ea4448bb2fd2b8fcfe153358a0e550e4973f0'/>
<id>2d7ea4448bb2fd2b8fcfe153358a0e550e4973f0</id>
<content type='text'>
We often need to clear cache.

For example, in web application development, when we changed source code, we would like the change applied to the app server without reboot.

In the case of a Rails application, this requires the following configuration:

```ruby
Rails.application.configure do
  config.to_prepare do
    MethodSource.instance_variable_set(:@lines_for_file, {})
  end
end
```

It seems so ugly, isn't it? So I feel we need to add `MethodSource.clear_cache` interface.

```diff
  Rails.application.configure do
    config.to_prepare do
-     MethodSource.instance_variable_set(:@lines_for_file, {})
+     MethodSource.clear_cache
    end
  end
```
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We often need to clear cache.

For example, in web application development, when we changed source code, we would like the change applied to the app server without reboot.

In the case of a Rails application, this requires the following configuration:

```ruby
Rails.application.configure do
  config.to_prepare do
    MethodSource.instance_variable_set(:@lines_for_file, {})
  end
end
```

It seems so ugly, isn't it? So I feel we need to add `MethodSource.clear_cache` interface.

```diff
  Rails.application.configure do
    config.to_prepare do
-     MethodSource.instance_variable_set(:@lines_for_file, {})
+     MethodSource.clear_cache
    end
  end
```
</pre>
</div>
</content>
</entry>
<entry>
<title>Allow fetching class/module comments.</title>
<updated>2021-11-03T00:36:59+00:00</updated>
<author>
<name>Stas SUȘCOV</name>
<email>stas@nerd.ro</email>
</author>
<published>2021-11-02T22:50:54+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/ruby-gems/method_source.git/commit/?id=8e5a1520c80661c6997638b45e5050ff946d844d'/>
<id>8e5a1520c80661c6997638b45e5050ff946d844d</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Release v1.0.0</title>
<updated>2020-03-19T13:08:45+00:00</updated>
<author>
<name>Kyrylo Silin</name>
<email>silin@kyrylo.org</email>
</author>
<published>2020-03-19T13:08:45+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/ruby-gems/method_source.git/commit/?id=b1411f8fed0c0d3225c4353c20c3d194daf00b6f'/>
<id>b1411f8fed0c0d3225c4353c20c3d194daf00b6f</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Handle new message for unterminated lists on MRI 2.7</title>
<updated>2019-10-26T15:22:30+00:00</updated>
<author>
<name>Jean Boussier</name>
<email>jean.boussier@gmail.com</email>
</author>
<published>2019-10-24T09:40:44+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/ruby-gems/method_source.git/commit/?id=5461b17602b465f8d259e25f0e749c4dff8b6208'/>
<id>5461b17602b465f8d259e25f0e749c4dff8b6208</id>
<content type='text'>
The error message for `issue = %W/` changed, before:

```
(eval):2: syntax error, unexpected tSTRING_END, expecting tSTRING_CONTENT or tSTRING_DBEG or tSTRING_DVAR or ' '
```

After:

```
((eval):2: unterminated list meets end of file)
```
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The error message for `issue = %W/` changed, before:

```
(eval):2: syntax error, unexpected tSTRING_END, expecting tSTRING_CONTENT or tSTRING_DBEG or tSTRING_DVAR or ' '
```

After:

```
((eval):2: unterminated list meets end of file)
```
</pre>
</div>
</content>
</entry>
<entry>
<title>Release v0.9.2</title>
<updated>2018-11-11T18:30:48+00:00</updated>
<author>
<name>Kyrylo Silin</name>
<email>silin@kyrylo.org</email>
</author>
<published>2018-11-11T18:30:48+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/ruby-gems/method_source.git/commit/?id=6259c06d87ee00ef8ab5a3897e41e6cd64a06378'/>
<id>6259c06d87ee00ef8ab5a3897e41e6cd64a06378</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "method_source: fix broken Procs on JRuby 9.2.0.0"</title>
<updated>2018-11-11T18:00:02+00:00</updated>
<author>
<name>Kyrylo Silin</name>
<email>silin@kyrylo.org</email>
</author>
<published>2018-11-11T18:00:02+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/ruby-gems/method_source.git/commit/?id=48405c48cd6c4054bdec187530a6d66b93a2b57b'/>
<id>48405c48cd6c4054bdec187530a6d66b93a2b57b</id>
<content type='text'>
Fixes #52 (Revert the JRuby 9.2.0.0 source_location hack once the newest version
is out)

This reverts commit 20fb1efde4530c78f7627d8b5b4e0b3f43cf821d.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes #52 (Revert the JRuby 9.2.0.0 source_location hack once the newest version
is out)

This reverts commit 20fb1efde4530c78f7627d8b5b4e0b3f43cf821d.
</pre>
</div>
</content>
</entry>
<entry>
<title>bump version number to 0.9.1</title>
<updated>2018-11-02T15:52:11+00:00</updated>
<author>
<name>John Mair</name>
<email>jrmair@gmail.com</email>
</author>
<published>2018-11-02T15:52:11+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/ruby-gems/method_source.git/commit/?id=609c4c438b38a8944ae5d9560b9c467775496c02'/>
<id>609c4c438b38a8944ae5d9560b9c467775496c02</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>method_source: fix broken Procs on JRuby 9.2.0.0</title>
<updated>2018-11-02T15:45:24+00:00</updated>
<author>
<name>Kyrylo Silin</name>
<email>silin@kyrylo.org</email>
</author>
<published>2018-11-01T18:49:11+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/ruby-gems/method_source.git/commit/?id=20fb1efde4530c78f7627d8b5b4e0b3f43cf821d'/>
<id>20fb1efde4530c78f7627d8b5b4e0b3f43cf821d</id>
<content type='text'>
Fixes https://github.com/pry/pry/issues/1804
(JRuby 9.2.0.0 breaks `source_location` and therefore our test suite)

JRuby 9.2.0.0 fails to fetch source code for procs because of the bug:
https://github.com/jruby/jruby/pull/5262

The problem is that source_location is reported at the end of the proc, instead
of the beginning.

The way I fix it is rather dumb (rewinding back and checking if it's complete
expression) but it's isolated only to 9.2.0.0 and likely won't be needed when
another JRuby is released. However, so far it's the latest release.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes https://github.com/pry/pry/issues/1804
(JRuby 9.2.0.0 breaks `source_location` and therefore our test suite)

JRuby 9.2.0.0 fails to fetch source code for procs because of the bug:
https://github.com/jruby/jruby/pull/5262

The problem is that source_location is reported at the end of the proc, instead
of the beginning.

The way I fix it is rather dumb (rewinding back and checking if it's complete
expression) but it's isolated only to 9.2.0.0 and likely won't be needed when
another JRuby is released. However, so far it's the latest release.
</pre>
</div>
</content>
</entry>
<entry>
<title>Version 0.9.0 release</title>
<updated>2017-09-26T11:42:15+00:00</updated>
<author>
<name>John Mair</name>
<email>jrmair@gmail.com</email>
</author>
<published>2017-09-26T11:42:15+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/ruby-gems/method_source.git/commit/?id=a79edca832f7afaf1605d6e198d92d66d77d4d7a'/>
<id>a79edca832f7afaf1605d6e198d92d66d77d4d7a</id>
<content type='text'>
ruby 2.4 support
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
ruby 2.4 support
</pre>
</div>
</content>
</entry>
<entry>
<title>Integer Unification for Ruby 2.4.0+</title>
<updated>2017-01-10T22:50:20+00:00</updated>
<author>
<name>Koichi ITO</name>
<email>koic.ito@gmail.com</email>
</author>
<published>2017-01-10T22:50:20+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/ruby-gems/method_source.git/commit/?id=05ce7fcb22d3c7b0100d328a52376c6d5cb9272a'/>
<id>05ce7fcb22d3c7b0100d328a52376c6d5cb9272a</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
