[#87847] undefined symbol: mjit_init_p — Leam Hall <leamhall@...>

I pulled Ruby trunk on 3 Jul and am now getting errors similar to the

10 messages 2018/07/07

[#88088] [Ruby trunk Misc#14937] [PATCH] thread_pthread: lazy-spawn timer-thread only on contention — normalperson@...

Issue #14937 has been reported by normalperson (Eric Wong).

9 messages 2018/07/24

[ruby-core:87913] [Ruby trunk Misc#14905] Strange behavior in Dir.glob using ** operator

From: tprobinson93@...
Date: 2018-07-12 00:06:40 UTC
List: ruby-core #87913
Issue #14905 has been updated by trobinson (Trevor Robinson).


Oops, sorry about that! In my efforts to anonymize the example, I broke it.

It's actually more like this:

~~~ text
human_records
 ├ project1 ─ records.yml
 └ common ┬ records_one.yml
          └ records_two.yml

cloud_records
 ├ AWS ┬ project1 ─ records.yml
 │     └ project2 ─ records.yml
 └ Azure ─ azproj1 ─ records.yml
~~~


~~~ ruby
Dir.glob("human_records/common/**.{yml,yaml}")
# => ["human-records/common/records.yml", "human_records/common/other_records.yml"]

Dir.glob("cloud_records/AWS/**.{yml,yaml}")
# => []
~~~

Sorry for the earlier erroneous description-- the weirdness is that `**` acts like `*` when used at the filename level.


----------------------------------------
Misc #14905: Strange behavior in Dir.glob using ** operator
https://bugs.ruby-lang.org/issues/14905#change-72923

* Author: trobinson (Trevor Robinson)
* Status: Feedback
* Priority: Normal
* Assignee: 
----------------------------------------
Hello,

I didn't want to report this as a bug because I'm not sure if it's intentional or not. The documentation didn't say either way. The `**` operator appears to work somewhat strangely when used in certain contexts.

An example setup to trigger the odd behavior looks something like this:
~~~ text
human_records
 ├ person1 ─ records.yml
 └ person2 ─ other_records.yml

cloud_records
 ├ AWS ┬ project1 ─ records.yml
 │     └ project2 ─ records.yml
 └ Azure ─ azproj1 ─ records.yml
~~~

Though the documentation doesn't say to do this, because of my experience with other globbing libraries, I did the following:

~~~ ruby
Dir.glob("human_records/**.{yml,yaml}")
# => ["human-records/person1/records.yml", "human_records/person2/other_records.yml"]

Dir.glob("cloud_records/**.{yml,yaml}")
# => []
~~~

So using `**` like this works if there is only one level of folders between the root and the target files, as if the glob was `"records/*/*.{yml,yaml}"`.

This seems like undefined behavior, so I thought I would bring it to your attention. If a change isn't a good solution to this, would a note in the documentation about undefined behavior around `**` be warranted?



-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>

In This Thread

Prev Next